gpt4 book ai didi

java - Android R.java 未生成并出现以下错误

转载 作者:行者123 更新时间:2023-12-01 12:54:39 27 4
gpt4 key购买 nike

我的 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++,没有任何变化。

最佳答案

您必须检查三件事。

1.如果xml文件名大写,会出现R.java错误。将名称更改为小写。

2.如果资源文件(图像、声音等)为大写,则会出现R.java错误。将名称更改为小写。

然后项目->清理

3.检查SDK Manager中是否安装了Android SDK Build-tools。

如果错误没有解决,请升级android sdk版本。

关于java - Android R.java 未生成并出现以下错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23992093/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com