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

后端 未结 10 1514
清歌不尽
清歌不尽 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 08:59

    This is what solved the problem for me:

    In my ids.xml file I had this code which worked fine before the android studio upgrade:

    <resources>
        <item name="faqID" type="id">faq</item>
    </resources>
    

    Changed it to:

    <resources>
        <item name="faqID" type="id"/>
    </resources>
    

    And everything is back to normal.

    0 讨论(0)
  • 2021-02-04 09:05

    Make sure you have no error in your ids.xml file.

    0 讨论(0)
  • 2021-02-04 09:06

    I faced this error the android build output gave me three options i clickced Run with --stacktrace after that it rebuild and showed me the line of the error like this layout/registeration_user_fragment.xml:86: error: not well-formed (invalid token).

    0 讨论(0)
  • 2021-02-04 09:07

    Just need to learn how to read error code.
    Please read the error log carefully

    in this case


    this is the main issue on your xml

    inner element must either be a resource reference or empty.

    Where?

    /home/protocol/DialerCheckout/WorkProjects/Nexge_Talk_New_UI/app/src/main/res/values/ids.xml

    0 讨论(0)
  • 2021-02-04 09:09

    The problem got solved when I used:

    ./gradlew app:assembleRelease
    

    instead of

    ./gradlew assembleRelease
    
    0 讨论(0)
  • 2021-02-04 09:13

    Upgrading buildVersionTools to 28.0.3 solved my issue.

    0 讨论(0)
提交回复
热议问题