ThreaderSlash ThreaderSlash - 1 year ago 114
Android Question

ndk-build eclipse argument: not find class

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:

Working Directory:
-d ${workspace_loc:/MyProject/jni} com.myproject.MyActivity

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:


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.

Answer Source

add -classpath it worked for me

-d ${workspace_loc:/MyProject/jni} -classpath ${workspace_loc:/MyProjec/src} com.myproject.MyActivity
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download