com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed after updating android studio

后端 未结 10 1547
清歌不尽
清歌不尽 2021-02-04 08:29

After updating android studio,i am getting this error.how to fix this??

org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
    at         


        
10条回答
  •  鱼传尺愫
    2021-02-04 09:25

    I migrated to AndroidX by selecting following in Android Studio Menu options

    Refactor -> Migrate to AndroidX

    Later I faced this AAPT issue, Linker issue etc. I fixed it by the following changes

    In all modules I have updated compileSdkVersion 28

    Still if you are facing issue then clean project and rebuild project. In all modules all classes imports are from the support libraries and used other version libraries excepet AndroidX. Just delete those imports then automatically AndroidX will import those components.

    Click on File -> Settings -> Build,Execution,Deployment -> Compiler 
    

    In that command line option I mentioned as --stacktrace for the details log when you build project.

    In details, I came to know that few classes still having old imports which are not androidx migrated, so I checked imports for the all the classes.

    --Vinod

提交回复
热议问题