Android - Could not find class ... referenced from

2.6k Views Asked by At

I'm writing my 4th year project and I am trying to add an external library but for some reason I can't seem to get this running. I have been Googling for days and I still can't seem to fix this problem.

I have tried the following:
1) I have added the jar file to the "libs" folder
2) I have added the jar file as a library
3) I've checked the library off in the "Build Path" > "Order and Export"

Anyone else have any possible suggestions?

dalvikvm(4015)          : Could not find class 'org.ejml.data.DenseMatrix64F', referenced from method com.makarintosh.voweltutor.FormantTracker.findRoots
dalvikvm(4015)          : VFY: unable to resolve new-instance 805 (Lorg/ejml/data/DenseMatrix64F;) in Lcom/makarintosh/voweltutor/FormantTracker;
dalvikvm(4015)          : DexOpt: unable to opt direct call 0x17e3 at 0x05 in Lcom/makarintosh/voweltutor/FormantTracker;.findRoots
AndroidRuntime(4015)    :   at com.makarintosh.voweltutor.FormantTracker.findRoots(FormantTracker.java:157)
AndroidRuntime(4015)    :   at com.makarintosh.voweltutor.FormantTracker.doLPC(FormantTracker.java:122)
AndroidRuntime(4015)    :   at com.makarintosh.voweltutor.Recorder.processData(Recorder.java:61)
AndroidRuntime(4015)    :   at com.makarintosh.voweltutor.Recorder$1.run(Recorder.java:80)

The library I am trying to add is this: https://code.google.com/p/efficient-java-matrix-library/

EDIT
I also forgot to mention that the error seems to occur only with the specified class, "DenseMatrix64F". Although other classes that I am using from the library seem to run just fine.
The error occurs during RUNTIME.

1

There are 1 best solutions below

4
On

First, you need to Read the Liberary manual because it is the best reference for your liberary

You have two ways in Android to add liberaries. First, to add a liberary project from Project>Preferences(Properties)> Android> Add Liberary project. Second to have a .Jar file and copy it into your project in Libs directory.

Sometimes you need to Clean and Build the project again after importing your liberary.

Look for this link and examples for your lib, it will help https://code.google.com/p/efficient-java-matrix-library/wiki/EjmlManual