Upload failed:
Your APK cannot be analyzed using 'aapt dump badging'. Error output:
to run aapt dump badging:
W/ResourceType(12713): Bad XML block: header size 28024 or total size 1702240364 is larger than data size 3783
ERROR: AndroidManifest.xml is corrupt
This is the error I am getting when I attempt to upload an APK onto Google Play and am completely unsure of what to do. I have looked at other posts but am unable to fix my problem. Any help is appreciated!!
-- Moksh
Is your apk run on emulator or device..?
Clean and build your project again. Sign it with your very own keystore and then try to upload it.
Make sure following points are need to be taken care of while uploading file on android market
"android:versionCode" attribute from AndroidManifest.xml is proper.
"android:versionName" attribute from AndroidManifest.xml is proper.
The package name is very unique,. Because all the apps on android market are separated by the package.
Related
We have a problem with uploading the next version of the application. We use code transparency for bundle and when we try to upload to Google Store it returns an error:
An error occurred while running bundletool build-apks on your uploaded App Bundle. Ensure that your App Bundle is valid by running bundletool build-apks locally and try again. Learn more. Error: Verification failed because code was modified after transparency metadata generation. Files deleted after transparency metadata generation: [] Files added after transparency metadata generation: [/com/android/tools/build/bundletool/archive/dex/1_8_2/classes.dex] Files modified after transparency metadata generation: []
It took the previous (and first) version normally. At first I thought it was due to obfuscation, see documentation:
Known limitations
Apps using anti-tamper protection or any other service that makes code changes after the code transparency file is generated will cause the code transparency verification to fail.
So I tried turning it off, but it didn't help. I tried to generate APKS locally, that was no problem, as well as the local code-transparency verification went fine. Unfortunately, I couldn't find any mention of this problem anywhere at all.
TL;DR: You can either:
upgrade the bundletool that generates your app bundle to 1.13.1, OR (since upgrading wasn't possible in my case) follow these steps to disable the storeArchive feature in your app project, and then regenerate the .aab file.
I had this exact same issue. This is an issue with bundletool version 1.13.1, and not the app bundle (.aab) or its code transparency file. The Google Play Console must have updated to 1.13.1 recently and that's why it's failing.
I went through the source code and here's why this is happening:
The .aab and code transparency file of your app correctly match. The .aab does not have a file at 1_8_2/classes.dex, and thus the code transparency file says there is no file at 1_8_2/classes.dex. The code transparency files list is empty.
When bundletool 1.13.1 validates the code transparency file, it creates a the list of files in the bundle, and then artificially adds 1_8_2/classes.dex to this list. This did not happen in version 1.11.0.
bundletool checks the bundle file's list it created in Step 2 against the code transparency file in Step 1. The code transparency file is empty, eg. it has no record of 1_8_2/classes.dex. However the list from Step 2 contains this file, and only because the tool added it. So it spits out the error message saying that someone added that file to your bundle after the transparency file was generated.
According to the source code, you can keep Step 2 from happening by disabling the storeArchive feature. There are multiple ways to do this, but I simply added
res/xml/com_android_vending_archive_opt_out.xml to my app:
<?xml version="1.0" encoding="utf-8"?>
<optOut />
Then I regenerated my app bundle and was able to upload successfully to the Google Play Console.
The link to the source code which i used to create debug apk, and try to create signed apk from it https://github.com/ritik2410/Elegant_Calculator
When i was trying to create a signed apk from my previously debugged apk, this 2 errors pop up:
2 errors at once
Error: C:\Users\pc\AppData\Local\Android\Sdk\build-tools\32.0.0\zipalign.exe -f 4 C:\Users\pc\AppData\Local\Temp\android4.apk C:\Users\pc\ApkProjects\app-debug\app-debug.apk
Unable to open 'C:\Users\pc\AppData\Local\Temp\android4.apk' as zip archive
After that i attempt to find the android4.apk in the location , and it is there ,its size is 0 bytes.
The second error right behind it was :
Error: null
This error was vague. I theorized its because the android4.apk was empty, but i wasnt able to find a fix. I was not able to classify which was the problem that caused this bug to happen. Can you suggest an possible fix to this problem?
I use Android Studio for development. When i finish the code source, I build and sign, but they tell me that your keystore is not correctly created, you have to convert it to pk20 so I use APK Signer to sign my APK. When I upload it to the console they told me this error :
Failed to run aapt dump badging:
W/ResourceType(471346): Bad resource table: header size 0x0 or total size 0x4b52 is not on an integer boundary
ERROR: dump failed because the resource table is invalid/corrup
Try to update your JDK for the latest version. It fixed the issue in my case.
I am new to android.
i get this error when i try to upload update of my app to google play.
Failed to run aapt dump badging:W/ResourceType(19538): Bad resource table: header size 0x708b or total size 0x2f2432a is larger than data size 0x1ce1c
ERROR: AndroidManifest.xml is corrupt
i tried ALMOST VERYTHING google fixes.but nothing works.
please help.
It gave me that 'uploading in debuggable mode' thiny too but i managed to fix it.
sorry about my bad english.
I went through the same problem recently (with the very similar error message) and I also had a lot of trouble to solve, but finally I got it like this:
I used the PhoneGap Builder to generate the APK (so I recommend using the same one); Remembering that to test manages the APK with the same blank key (it's the default markup);
After generating, I used Apk-Signer (https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/) to generate the key (.keystore) - this package serves, too , To sign and align the application; However, for that case I used ONLY to generate the key;
Go back to the Phone Gap, in the Android options, select 'add a key ...', then select your keystore generated in APK-Signer, and activate the rebuild;
Ready! Now just download the APK, go to google play and be happy.
I ran into a similar problem not so long ago it turned out to be an issue with #+id
A similar question has been asked before and got me through my problem, I will link the post as it is very informative.
Android style Resources compile (aapt) failing : Bad resource table: header size 0xc
Hope this helps you, wish you the best of luck.
I'm new to android too, and I had the same problem, and what worked for me was as simple as :
Zipalign the apk file by a tool called "Advanced APK tool" (download it from xda forum)
then reupload apk file to store without any problem detected,
Best of luck!
Try using a latest version of aapt, from your Android SDK directory,
<Android_SDK_directory>/build-tools/<build_tools_version>/aapt
Today when I tried to upload an update of my app, I got this from Google Play console:
UPLOAD NEW APK TO PRODUCTION
Upload failed Your APK cannot be analyzed using 'aapt dump badging'.
Error output: Failed to run aapt dump badging: ERROR getting
'android:value' attribute for meta-data:attribute could not be found
I can upload normally before. I haven't made any change in AndroidManifest.xml.
The app is built via ant. I also tried building it again, even with the last-known-good code, the same error occurs.
Should I report this to Google Play team, or is it a known issue of Google Play?
Is there any work around?
It's now acknowledged by Google:
Some developers have reported seeing the error "Failed to run aapt dump badging: ERROR getting 'android:value' attribute for meta-data:attribute could not be found" when attempting to upload their .apk.
We're working on solving this problem. In the meantime, you can try adding the "android:value" to any meta-data manifest property that lacks that attribute. See API Guides - for more information.
https://support.google.com/googleplay/android-developer/known-issues/24493
I had the exact same problem, but managed to fix it now.
The problem is definitely in your manifest file. For me it was the Samsung MultiWindow feature. I found the solution here: Google Code Issue 46311
I had to change
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="#dimen/app_defaultsize_w"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="#dimen/app_defaultsize_h"/>
into
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632dp"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598dp"/>
Worked fine since yesterday, but now i had to change it.
Hope it helps.
Same problem here after generating new apk for alpha release with same certificate I get the error (in Dutch):
Upload mislukt
Uw APK kan niet worden geanalyseerd met 'aapt dump badging'. Foutuitvoer:
Failed to run aapt dump badging:
ERROR getting 'android:value' attribute for meta-data:attribute could not be found
I found one place in my Manifest where I use android:value for samsun multiwindow support.
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
I removed that from the Manifest. generated new apk (after project clean rebuild) and got the same error. This Manifest worked in my apk when uploading a previous version two weeks ago.
Use
android:name="some string value"
Instead of
android:name="#string/name_of_string_resource"
In my case, when building for ionic I forgot to add the .aab extension in the command land
I entered this into the cmd line
zipalign -v 4 app-release.aab appname_2.0.0
instead of
zipalign -v 4 app-release.aab appname_2.0.0.aab