Failed to execute aapt (NoSuchElementException at AbstractIndexedListIterator.next(AbstractIndexedListIterator.java:80)

后端 未结 5 808
小蘑菇
小蘑菇 2020-12-03 07:18

The project gets built without error from Android Studio -> Build -> Build APKs and after installation it works fine. But running the project with a Run Configuration gives

5条回答
  •  一整个雨季
    2020-12-03 08:04

    In your gradle properties: remove android.enableAapt2=false, and upgrade the buildToolVersion in your app build.gradle and in all the other modules(if used) too.

    Run the command gradlew --info assembleDebug in your terminal and check for other errors and if you find them then manually go and fix them. In my case there was a 9 patch image which was causing all the trouble.

    Try to clean and rebuild your project.

    Or

    Try to disable instant run feature and see if it works.

    Or

    Try and enable multiDexEnabled.

    defaultConfig {
        multiDexEnabled true
    }
    

    Or

    File -> Invalidate caches and restart

提交回复
热议问题