Manifest Merger fails after upgrading to Android M

250 Views Asked by At

After pointing to the latest manifest-merger.jar provided in the Android M preview and updating my apps to

<uses-sdk targetSdkVersion='MNC'>
<uses-sdk minSdkVersion='MNC'>

when attempting to use the manifest merger on these apps, I get the following error:

EXEC : error : [C:\MyApp\AndroidManifest.xml:3] Failed to parse <uses-sdk targetSdkVersion='MNC'>: must be an integer number or codename.

I am using the same command I was for the previous manifest-merger.jar and it used to work fine.

Update1: adding command

"F:\bin\JDK.1.7.0.51\bin\java.exe" -classpath "F:\android-MNC-sdk\tools\lib\sdklib.jar;F:\android-MNC-sdk\tools\lib\manifest-merger.jar"  com.android.manifmerger.Main merge --out foo.xml --main app1\AndroidManifest.xml --libs appBase\AndroidManifest.xml 
1

There are 1 best solutions below

1
On BEST ANSWER

Oddly enough, even though it produced this error, it was actually also producing the merged manifest. Definite bug with the 24.3.3 version of manifest-merger.jar

Reported here: https://code.google.com/p/android-developer-preview/issues/detail?id=2487