We are developing a system for Android devices. For that we are using FC16, Eclipse, SDK, NDK.
In Eclipse: Run > External tool > External Tolls Configurations > we have the tabs:
[Main]
Location:
/usr/java/jdk1.7.0_02/bin/javah
Working Directory:
${workspace_loc:/MyProject/bin}
Arguments:
-d ${workspace_loc:/MyProject/jni} com.myproject.MyActivity
[Refresh]
Specify Resources
MyProject - JNI
Then when clicking on "Apply" and "Run" it comes the error message:
Error: Could not find class file for 'com.myproject.MyActivity'.
But, on the other hand if we go on terminal into the directory /MyProject and run the command:
ndk-build
No error appears, and the program runs as native C++ on Android.
What is missing on Eclipse IDE? Should be something to do with the [Argment] as informed in [External Tolls Configurations], or is it something else we missed?
All comments and suggestions are welcome and highly appreciated.
add -classpath it worked for me
-d ${workspace_loc:/MyProject/jni} -classpath ${workspace_loc:/MyProjec/src} com.myproject.MyActivity
There is one error yet. The correct is:
-d ${workspace_loc:/MyProject/jni} -classpath ${workspace_loc:/MyProject/src} com.myproject.MyActivity
The diference is the t
in MyProject/src
.
It worked on my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With