Android runtime exception - Could not find class XXX referenced from method XXX.<init> -
i have few android projects i'm trying set together, i'm facing runtime exceptions can't understand.
the projects built this:
c/c++ project projcore (has .c , .h files)
android project projb -> uses -> projcore
notes: projb implements service , uses projcore through aidl generated java classes. projcore within jni folder. ndk installed. projb configured run ndk-build automatically. projcore's compilation generate libs dir .so file.
android project proja -> uses -> projb
notes: proja implements activity , uses projb service class.
proja , projb(including projcore) build successfully, apk generated, in runtime, when run proja's activity next error messages:
w/dalvikvm(5357): unable resolve superclass of lcom/signove/health/servicetest/healthservicetestactivity$1; (16) w/dalvikvm(5357): link of class 'lcom/signove/health/servicetest/healthservicetestactivity$1;' failed e/dalvikvm(5357): not find class 'com.signove.health.servicetest.healthservicetestactivity$1', referenced method com.signove.health.servicetest.healthservicetestactivity.<init>
from i've learned, these messages associated projects using external jars, , people forget set these jars in libs folder. project crashing(proja) has dependency project projb , dependency configured in project properties.
i'm using: - kubuntu 10.04 - eclipse indigo - android ndk-r8 - eclipse cdt installed
does know problem is?
i found problem in projects. eclipse android plugins doesn't recognize aidl folder source folder, doesn't generate java classes aidl.
i have fixed in projb forgot prepare in proja (that has aidl files)...
if same problem, prepare go in project -> properties, select "java build path", go tab "source" , add together aidl folder. in tab order , export move "aidl" folder before "src" folder.
hope help others.
android android-ndk native aidl multi-project
No comments:
Post a Comment