I found already about 5 answers, tried all of them and didn't get it working.
Env: Ubuntu 12.04/ Indigo
Run->External Tools->External Tools Configuration...
Created new Program
Location: /usr/bin/javah /*$ which javah gives /usr/bin/javah */
Working directory: ${workspace_loc:/MyProject/bin/classes}
Attributes: -d ${workspace_loc:/MyProject/jni} com.myproject.MyActivity
Result of RUN: Could not find class file for 'com.myproject.MyActivity'
Run from terminal gives same result
maxim@ubuntu:~/workspace/MyProject/bin/classes$ javah -jni com.myproject.MyActivity
Error: cannot access android.app.Activity
class file for android.app.Activity not found
maxim@ubuntu:~/workspace/MyProject/bin/classes$
SDK/NDK installed, external paths added.
How to add missing parts? Thanks everybody.
Edited Jul 3
Moving native lib loading to a separate class solved the problem
解决方案
I had a very similar problem on linux too . it turned out that i didn't do it on the right folder.
Try to read it and see if it helps: Using javah on linux.
博主在Ubuntu 12.04环境下配置Java,尝试多种方法仍无法解决问题。运行javah时提示找不到类文件,在终端运行也有同样结果,即便安装了SDK/NDK并添加外部路径也不行。最终通过将本地库加载移到单独类解决问题。
1093

被折叠的 条评论
为什么被折叠?



