我的R.java不想生成以下错误:
[2014-06-02 12:05:33 - test] Using default Build Tools revision 19.1.0
[2014-06-02 12:05:33 - test] Refreshing resource folders.
[2014-06-02 12:05:33 - test] Using default Build Tools revision 19.1.0
[2014-06-02 12:05:33 - test] Starting incremental Pre Compiler: Checking resource changes.
[2014-06-02 12:05:33 - test] Preparing generated java files for update/creation.
[2014-06-02 12:05:33 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt package -m -v -J /home/erwan/workspace/test/gen -M /home/erwan/workspace/test/AndroidManifest.xml -S /home/erwan/workspace/test/res -I /home/erwan/.android-sdks/platforms/android-19/android.jar
[2014-06-02 12:05:33 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[2014-06-02 12:05:33 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[2014-06-02 12:05:33 - test] 'aapt' error. Pre Compiler Build aborted.
[2014-06-02 12:05:34 - test] Removing generated java classes.
[2014-06-02 12:05:34 - test] Using default Build Tools revision 19.1.0
[2014-06-02 12:05:34 - test] Refreshing resource folders.
[2014-06-02 12:05:34 - test] Using default Build Tools revision 19.1.0
[2014-06-02 12:05:34 - test] Starting full Pre Compiler.
[2014-06-02 12:05:34 - test] Removing generated java classes.
[2014-06-02 12:05:34 - test] Generating BuildConfig.java...
[2014-06-02 12:05:34 - test] Preparing generated java files for update/creation.
[2014-06-02 12:05:34 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt package -m -v -J /home/erwan/workspace/test/gen -M /home/erwan/workspace/test/AndroidManifest.xml -S /home/erwan/workspace/test/res -I /home/erwan/.android-sdks/platforms/android-19/android.jar
[2014-06-02 12:05:34 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[2014-06-02 12:05:34 - test] /home/erwan/.android-sdks/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[2014-06-02 12:05:34 - test] 'aapt' error. Pre Compiler Build aborted.
[2014-06-02 12:05:35 - test] Using default Build Tools revision 19.1.0
[2014-06-02 12:05:35 - test] Refreshing resource folders.
[2014-06-02 12:05:35 - test] Starting full Package build.
[2014-06-02 12:05:35 - test] Using default Build Tools revision 19.1.0
项目已经清理和修复,仍然没有R.java。我已经生成了一个新项目,同样的问题。我重新安装了libstdc ++而没有任何改变。
答案 0 :(得分:1)
您需要检查三件事。
1.如果xml文件名为大写,则会发生R.java错误。 将名称更改为小写。
2.如果资源文件(等图像,声音)是大写的,则会发生R.java错误。 将名称更改为小写。
然后项目 - >清除
3.检查SDK Manager中是否安装了Android SDK Build-tools。
如果错误未解决,请升级android sdk版本。
答案 1 :(得分:0)
重新安装所有Android SDK组件解决了这个问题。
删除了SDK及其所有组件
重新安装Android SDK
重新安装所有SDK组件
清理所有项目
R.java
又回来了。