Build errors after Android Studio 3.2.1 upgrade

前端 未结 9 1358
我在风中等你
我在风中等你 2020-11-29 00:24

I am building a sample project from Udacity. This was working fine till now, but after upgrading to Android Studio 3.2.1, I am facing the build error below.

Gradle v

9条回答
  •  攒了一身酷
    2020-11-29 01:12

    To get this solved

    Firstly download the missing Jar file from the link below. I see you are missing version 3.2.1-4818971

    https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-windows.jar

    Switch your folder structure from Android to Project.

    Now navigate to the libs folder inside the app - build folder. (If the libs folder does not exist, you can create it by right clicking on the app folder - select New - select Directory.)

    Paste the downloaded.jar file inside libs folder. Right click on the jar file and at the bottom click on Add as library. This will take care of adding implementation files('libs/library_name.jar') in build.gradle [You don't have to manually enter this in your build file].

    Everything should be okay once you sync after doing the above. Here is the source link to this solution: https://developer.android.com/studio/command-line/aapt2#download_aapt2

    Let me know if you run into any other issues whilst doing the above.

提交回复
热议问题