Android - Inner element must either be a resource reference or empty

前端 未结 8 1373
天涯浪人
天涯浪人 2020-11-29 04:00

Error Details

AGPBI: {\"kind\":\"error\",\"text\":\"error: \\u003citem\\u003e inner element must either be a resource reference or empty         


        
8条回答
  •  一向
    一向 (楼主)
    2020-11-29 04:17

    In the the values folder I double clicked the ids.xml file this was causing the issue

    
    
        rollButton
    
    

    I tried the some of the voted answers:

    
    

    But I got an error that said:

    The element type "item" must be terminated by the matching end-tag "".
    

    So to fix I just added the matching ending tag:

    
    

    UPDATE

    I'm new to Kotlin so what I just noticed and what I didn't realize is the needs the forward slash at the end to go before the closing >. If you don't include it then you will get the error I got but if you do include it the accepted answer works.

提交回复
热议问题