Ndk-build eclipse argument: not find class

We are developing a system for Android devices. For this we use FC16, Eclipse, SDK, NDK.

In Eclipse: Run> External Tool> External Account Configurations> we have 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 you click "Apply" and "Run", an error message appears:

 Error: Could not find class file for 'com.myproject.MyActivity'. 

But, on the other hand, if we go to the terminal in the / MyProject directory and run the command:

 ndk-build 

The error does not appear, and the program starts as native C ++ on Android.

What is missing in the Eclipse IDE? Should there be something to do with [Argment], as indicated in [Configuration of external accounts], or is it something else that we missed?

All comments and suggestions are welcome and much appreciated.

+4
source share
2 answers

add -classpath this worked for me

 -d ${workspace_loc:/MyProject/jni} -classpath ${workspace_loc:/MyProjec/src} com.myproject.MyActivity 
+9
source

Another mistake so far. Right:

 -d ${workspace_loc:/MyProject/jni} -classpath ${workspace_loc:/MyProject/src} com.myproject.MyActivity 

The difference is t in MyProject/src .

He worked on my project.

+4
source

Source: https://habr.com/ru/post/949382/


All Articles