简体   繁体   English

Android Studio 中 build.gradle 和 R.java 文件的重要性是什么?

[英]what is the important of build.gradle and R.java file in Android Studio?

"Gradle: Execution failed for task ':Results:processDebugResources' “Gradle:任务':Results:processDebugResources'的执行失败

Running /home/mydata/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt failed.运行 /home/mydata/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt 失败。

R.java file is empty, I don't know wheather the above error is the reason or not. R.java 文件是空的,不知道是不是上面的错误。 My R.java is located in src/main/gen/com/example/results我的 R.java 位于 src/main/gen/com/example/results

Try the following:请尝试以下操作:

-Migrate project to androidx - 将项目迁移到 androidx

-Raise the minSDK and targetSDK - 提升 minSDK 和 targetSDK

-update all dependencies to the newest version -将所有依赖项更新到最新版本

This issue usually comes from an issue with a dependency in your build gradle.此问题通常来自构建 gradle 中的依赖项问题。 Either one is not compatible or up to date with the rest of the dependencies or the version you are using is bugged.要么与其余依赖项不兼容或最新,要么您使用的版本有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM