문제

I have downloaded the binary Zip from here. I extracted the zip to a folder. Then I right clicked on libs folder in Eclipse. I Imported the *.jar file to the libs folder, and then I right clicked on it and added to path. I added

 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;

to my java file, and i am adding values to

DescriptiveStatistics rStandardDeviation = new DescriptiveStatistics();

and after that I run the math part by:

double bMean = bStandardDeviation.getMean();
double rStd = rStandardDeviation.getStandardDeviation();

No errors on compile, clean, or build. When I attempt to run the app on my phone i get:

Could not find class 'org.apache.commons.math3.stat.descriptive.DescriptiveStatistics', referenced from method com.example.mydemo.MainActivity.<init>

Any ideas anyone what is going wrong?

Thank you

도움이 되었습니까?

해결책

In your Build Configuration, make sure you check your library to be exported in Order and Export. See

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top