Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphView on Android Studio #288

Closed
davix10 opened this issue Feb 5, 2015 · 18 comments
Closed

GraphView on Android Studio #288

davix10 opened this issue Feb 5, 2015 · 18 comments

Comments

@davix10
Copy link

davix10 commented Feb 5, 2015

Hi, I can not load the library on android study also having followed the steps and still get this error: cannot resolve method. Please help me. Import only this "import com.jjoe64.graphview.GraphView;"

@jjoe64
Copy link
Owner

jjoe64 commented Feb 5, 2015

which method can not be resolved?

@davix10
Copy link
Author

davix10 commented Feb 5, 2015

resetData, setViewPort and more

@ptrasatti
Copy link

It's working fine for me w/ Android Studio and Graphview 4.0.0.

Include one of these to resolve depending on the class you are using and it should resolve for you.
import com.jjoe64.graphview.series.Series;
import com.jjoe64.graphview.series.BaseSeries;
import com.jjoe64.graphview.series.LineGraphSeries;
import com.jjoe64.graphview.series.BarGraphSeries;
import com.jjoe64.graphview.series.PointGraphSeries;

Phil

@davix10
Copy link
Author

davix10 commented Feb 6, 2015

import com.jjoe64.graphview.BarGraphView; -------> cannot resolve symbol 'BarGraphView'

I have this

@ptrasatti
Copy link

You forgot ".series" in the import statement,
It's "import com.jjoe64.graphview.series.BarGraphSeries"

NOT "import com.jjoe64.graphview.BarGraphSeries"

Phil

@davix10
Copy link
Author

davix10 commented Feb 6, 2015

I have always errors here resetData

@jjoe64
Copy link
Owner

jjoe64 commented Feb 6, 2015

are you sure you use the current version of GraphView?
please check your dependency in Gradle file and check your code
clean / rebuild all, reload gradle etc...
it's not a bug of graphview

@jjoe64 jjoe64 closed this as completed Feb 6, 2015
@davix10
Copy link
Author

davix10 commented Feb 6, 2015

compile 'com.jjoe64:graphview:4.0.0' is in the gradle

@ptrasatti
Copy link

Here's the code... everything works fine if the right imports are used.

Phil

import com.jjoe64.graphview.GraphView;
import com.jjoe64.graphview.series.BarGraphSeries;

{
DataPoint[] dp = {new DataPoint(0,0), new DataPoint(1,1), new DataPoint(2,2)};
BarGraphSeries barGraphSeries = new BarGraphSeries(dp);
...
barGraphSeries.resetData(dp);
}

@jjoe64
Copy link
Owner

jjoe64 commented Feb 6, 2015

@davix10 please show your code if it is till not working

@davix10
Copy link
Author

davix10 commented Feb 6, 2015

This is my code:
findViewById(R.id.Graph).setVisibility(View.VISIBLE);
if (isFloatNumber(prova)){

                            if(relative==false)
                            {

                                Series.resetData(new GraphViewData[] {
                                        new GraphViewData(1,risultato)

                                });
                                tresh1.resetData(new GraphViewData[] {

                                        new GraphViewData(2,0)
                                });
                                range1.resetData(new GraphViewData[] {
                                        new GraphViewData(3,0)

                                });


                            }

@davix10
Copy link
Author

davix10 commented Feb 6, 2015

I get the error already here: static GraphViewSeries range1, range2, range3, range4

@jjoe64
Copy link
Owner

jjoe64 commented Feb 6, 2015

show your imports

@davix10
Copy link
Author

davix10 commented Feb 6, 2015

import com.jjoe64.graphview.series.Series;
import com.jjoe64.graphview.series.BaseSeries;
import com.jjoe64.graphview.series.LineGraphSeries;
import com.jjoe64.graphview.series.BarGraphSeries;
import com.jjoe64.graphview.GraphView;

@jjoe64
Copy link
Owner

jjoe64 commented Feb 6, 2015

and there is no errors on that import lines?

@davix10
Copy link
Author

davix10 commented Feb 7, 2015

no

@osamaastal
Copy link

***** I tried all of these, but it can't resolve symbol "jjoe64" !!! *****

import com.jjoe64.graphview.series.Series;
import com.jjoe64.graphview.series.BaseSeries;
import com.jjoe64.graphview.series.LineGraphSeries;
import com.jjoe64.graphview.series.BarGraphSeries;
import com.jjoe64.graphview.GraphView;

@royseberg
Copy link

royseberg commented Jun 6, 2018

On a similar note, with implementation ... 4.2.2 I get errors on the following:

import com.jjoe64.graphview.GraphViewSeries;
import com.jjoe64.graphview.LineGraphView;

However, with implementation ... 3.1.4 the errors on those imports disappear What's happening?
Of course if I then use 3.1.4 instead of 4.2.2 the app compiles but then I get another error:

android.view.InflateException: Binary XML file line #9: Error inflating class com.jjoe64.graphview.GraphView

Can't win for losing!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants