本文介绍了NDK-构建Eclipse的说法:找不到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发Android设备的系统。为此,我们使用的是FC16,Eclipse的SDK,NDK。

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

在Eclipse中:运行>外部工具>外部路费配置>我们有标签:

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'.

不过,在另一方面,如果我们去终端到目录/ MyProject的,然后运行命令:

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

ndk-build

没有错误出现,该程序作为Android原生C ++运行。

No error appears, and the program runs as native C++ on Android.

现在缺少对Eclipse IDE的?应该是做的[Argment]作为告知[外部路费配置],或者是其他什么东西,我们错过了什么?

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?

所有的意见和建议,欢迎和高度AP preciated。

All comments and suggestions are welcome and highly appreciated.

推荐答案

添加-classpath它为我工作。

add -classpath it worked for me

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

这篇关于NDK-构建Eclipse的说法:找不到类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 14:21