Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the logcat warning `Unknown element under <manifest>: meta-data` mean?

While running a a freshly installed app, I find this Warning messages in the logcat:

W/PackageManager( 1233): Couldn't remove dex file for package:  at location /data/app/xx.yy.zz-1/base.apk, retcode=-1
I/SmartHeartBeat( 1233): listenAppUpdate, package: xx.yy.zz has been Updated
W/PackageParser( 2909): Unknown element under <manifest>: meta-data at /storage/emulated/0/xxx/zz.apk Binary XML file line #143

Trying to track down the offending meta-data element tagged Binary XML file line #143, I find the following:

# aapt l -a zz.apk

AndroidManifest.xml
META-INF/CERT.RSA
META-INF/CERT.SF
META-INF/MANIFEST.MF
...
Android manifest:
N: android=http://schemas.android.com/apk/res/android
  E: manifest (line=2)
    ...
    A: platformBuildVersionCode=(type 0x10)0x19 (Raw: "25")
    A: platformBuildVersionName="7.1.1" (Raw: "7.1.1")
    ...
    E: meta-data (line=143)
      A: android:name(0x01010003)="android.support.VERSION" (Raw: "android.support.VERSION")
      A: android:value(0x01010024)="25.3.1" (Raw: "25.3.1")
...

But I don't have anything like this in my AndroidManifest.xml and the only other reference to "25.3.1" is in my gradle.build file, which are the dependency lines for the Android Support Libraries:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:25.3.1'
    ...
}

What is the problem and why does this warning occur? (How do I resolve it?)

like image 435
not2qubit Avatar asked Apr 07 '17 11:04

not2qubit


People also ask

What is meta data in Android manifest?

<meta-data>A name-value pair for an item of additional, arbitrary data that can be supplied to the parent component. A component element can contain any number of <meta-data> subelements. The values from all of them are collected in a single Bundle object and made available to the component as the PackageItemInfo.

How can I open manifest file in Android?

Double-click AndroidManifest. xml to open it. The Manifest specifies a range of app-level settings, including: Permissions for any device access the functionality requires, such as location, Internet access, phone calling information, and so on.

What is Tools node remove?

Like tools:node="remove" , but it removes all elements matching this element type (within the same parent element). Replace the lower-priority element completely. That is, if there is a matching element in the lower-priority manifest, ignore it and use this element exactly as it appears in this manifest.


1 Answers

Turning off instant run feature would resolve the issue.

like image 130
azizbekian Avatar answered Oct 13 '22 11:10

azizbekian