android - ndk-build eclipse 参数 : not find class

标签 android c++ eclipse android-ndk installation

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

在 Eclipse 中:运行 > 外部工具 > 外部通行费配置 > 我们有选项卡:

[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

然后单击“应用”和“运行”时出现错误消息:

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

但是,另一方面,如果我们进入终端目录/MyProject 并运行命令:

ndk-build

没有报错,程序在Android上作为原生C++运行。

Eclipse IDE 缺少什么?应该与 [External Tolls Configurations] 中告知的 [Argment] 有关,还是我们遗漏了什么?

欢迎并高度赞赏所有意见和建议。

最佳答案

添加 -classpath 它对我有用

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

关于android - ndk-build eclipse 参数 : not find class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9200373/

相关文章:

android - RecyclerView 在聊天屏幕中滚动到 notifyDataSetChanged 顶部

android - Kotlin Android 去抖动

java - eclipse 在完成方法的全名之前自动完成

Eclipse git 无法完成 rebase

java - 如何将 PHP 时间戳转换为在 Java 中将日期时间格式显示为字符串(与 UTC 不同)?

android - 有没有办法从应用程序内兑换促销代码?

c++ - 包括来自预建库 Android.mk 的头文件

C++ - 销毁顺序 - 函数的静态成员在主类析构函数之前被销毁

c++ - 等待异步方法完成

Android 的渐变绘图 : poor quality of screenshots in Eclipse