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

When declaring id in resources, the body should be empty

<item
    type="id"
    name="id_name" />

For more info please have a look on below link

https://developer.android.com/guide/topics/resources/more-resources#Id

So as Oliver Manyasa mentioned, it should be as below

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="tv_deviceName" type="id"/>
</resources>

I had a similar issue after upgrading to Android Studio 3.2.1

The error was pointing to this item in ids.xml file

<item name="mnuActivate" type="id">Activation</item>

As mentioned by the user Sangeet Suresh, I changed it to

<item name="mnuActivate" type="id" />

That fixed the issue.