Android resource compilation failed in 3.3.0-alpha02

后端 未结 4 774
南旧
南旧 2021-01-05 18:09

Whenever I try and build my project, I get this error:

Android resource compilation failed
Output:  
C:\\Users\\smart\\AndroidStudioProjects\\ShoppingList\\a         


        
4条回答
  •  独厮守ぢ
    2021-01-05 18:30

    I got something similar where the Android resource compilation failed.

    error:  inner element must either be a resource reference or empty.
    

    I'm seeing some posts that suggest deleting a "ids.xml" file and that fixes the issue. While that may fix it, you may be doing more harm since code may refer to that id tag.

    I fixed my issue by updating the "ids.xml" file from:

    
    
        id
    
    

    To:

    
    
        
    
    

    Notice how the Item tag is a self closing xml element now. This is the correct way to list id's within the "ids.xml" file now. You can refer to the official Android documentation for this as well.

    Cheers!

提交回复
热议问题