Development issue/problem:

Error detail

U003citemu003e internal element must either be a source reference or empty… source: [file:…].xml,position:{startLine:2,startColumn:4,startOffset:57,endColumn:61,endOffset:114}}],original:,tool:AAPT}
:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception : AAPT2 error : Check the logs for more details
:app:mergeDebugResources FAILED

SAFETY : The design failed with one exception.

*
The ‘:app:mergeDebugResources’ task has failed.
> Error: java.util.competitor.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception : AAPT2 error : Check the data for the parts.

Source file

device_name_tv

Building environment

How can I solve this problem?

Solution 1:

If you give a resource ID, the body must be empty.

For more information, see the link below.

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

So, as Oliver Manyasa said, it should be like this.

Solution 2:

I had a similar problem after upgrading to Android Studio 3.2.1.

The error was about this element in the ids.xml file

Activation

As mentioned by user Sangeet Suresh, I changed it to

That solved the problem.

Solution 3:

For those who are still stretching their brains to find a solution to this problem, create an ids.xml in src/main/res/values with a content similar to the next one (but make sure you update it with the ids you see errors in) :

Now Android Studio generates an error for explicit values, and if those values come from a library you’re using, you can’t make any changes to the intermediate file, so edit here instead and when you merge your code, Android Studio will take care of it.

Solution 4:

In your resource file, delete both the closing tag and the body, i.e. delete tv_deviceName.

and make your source file look like this:

Solution No 5:

For me it actually failed because the new versions of Gradles. I’m pretty sure some of the plugins I use are not compatible with the latest diploma. I managed that with the next versions:

Get ready for graduation. Properties file :

distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip

build.gradle file

Dependencies {
classpath ‘com.android.tools.build:gradle:3.0.1’
}

EDIT:

Since we now want to use the 3.2.+ versions, this is not a reliable solution.

I finally created a new ids.xml file and overwrote all inconsistent values.

an example of the ids.xml file :

Solution No 6:

I put this automatically generated file in res/xml/values with empty tags such as

That’s just it!

Solution No 7:

I made the following mistake

Wrong: The internal element must either be a link to the source or empty.

In my case I created a new test project and removed the toolbar and fab from the activity_main.xml file, but they were also in the ids.xml file. After removing both identifiers from the ids.xml file, I could get started. Your IDs.xml file can have a lot of identifiers, but since I created a new project, it doesn’t have one anymore.

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

The screenshot above shows the exact location of the file.

Solution No 8:

In the values folder I double-clicked the ids.xml file that caused problems

rollButton

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

I tried some of the answers you chose:

But I have a mistake that says:

The element type Element must be closed with the corresponding End tag.

To fix this, I just added a fitting end label:

FIXED

I’m new to Cotlin, and what just struck me, and what I didn’t understand, is the need to end the slash before closing >. If you don’t turn it on, you will get the error message I received, but if you turn it on, the accepted answer works.

Good luck!

android resource compilation failed,android resource linking failed,ids xml,agpbi: (kind'':error'',text'':android resource compilation failed),item> inner element must either be a resource reference or empty in android,resource and asset merger error in android studio,android resource linking failed styles xml,android resource linking failed cardview

You May Also Like

The Most Accessible 360 Camera

The 360 degree camera, also known as an omnidirectional camera, has a…

Simple Method To Fix OneDrive Cam­era Upload Not Work­ing On IPhone

Originally published on the 25th. November 2020 at 9:02 a.m. The performance…

Hidden Google Easter Eggs to impress your friends & colleagues

Most of us know that Google is one of the leading search…

Android Studio: More Powerful App Development Tools

Studio Android : At the Google I/O Developers Conference on the 17th.…