androidbuildbuild.gradler.java-file

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


"Gradle: Execution failed for task ':Results:processDebugResources'

Running /home/mydata/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt failed.

R.java file is empty, I don't know wheather the above error is the reason or not. My R.java is located in src/main/gen/com/example/results


Solution

  • Try the following:

    -Migrate project to androidx

    -Raise the minSDK and targetSDK

    -update all dependencies to the newest version

    This issue usually comes from an issue with a dependency in your build gradle. Either one is not compatible or up to date with the rest of the dependencies or the version you are using is bugged.