To package APK these days, you need to use the AAPT command to remove the old certificate file in APK, add a new certificate file again, and then sign and repackage again. It is found that when using the AAPT remove command, the error during crash – archive is toast is always reported. After a day’s comparison, it is found that it is related to the referenced com.android.tools.build: gradle: 4.1.1 and gradle-6.5-bin versions. As long as it is equal to or greater than this version, this error will be reported, which should be a bug of AAPT.
Solution:
1. The gradle plug-in is lower than these two versions. It’s unrealistic. It’s impossible not to upgrade it all the time.
2. Since APK is essentially a zip file, simply when deleting the file, open the APK package directly with the zip decompression software, manually delete the ball, and complete the remaining AAPT add command and re signature operation with the command line.
Read More:
- Android Package Error: AAPT: error: IDAT: incorrect data check. AAPT: error: file failed to compile.
- Vant toast light prompt error [How to Solve]
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- AAPT2 error: check logs for details [How to Solve]
- [Solved] AAPT: error: resource android:attr/lStar not found
- SpringBoot Error running ‘Application’: Command line is too long.Shorten command line for
- [Solved] Error running XxlJobExecutorHiveApplication. Command line is too long. Shorten the command line via
- [Solved] Oracle Delete the Archive Error: RMAN-08137
- Error running ‘PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration
- [Solved] Compile Error: AAPT: error: resource android:attr/lStar not found
- [Solved] Android Studio Error: AAPT: error: file failed to compile
- AAPT: error: attribute cardBackgroundColor (aka com.x.x:cardBackgroundColor) not found.
- [Solved] Error running ‘WebApplication‘: Command line is too long. Shorten command line for WebApplication or
- [Solved] Error running ‘LocalTest‘: Command line is too long. Shorten command line for LocalTest or also for…
- flutter | W/zipro(12512): Error opening archive D:\…Invalid file ERROR: dump failed because…
- [Solved] torchvision.models.resnet18() Error: PytorchStreamReader failed reading zip archive: failed finding…
- [Solved] Android Error: AAPT: error: unescaped apostrophe in string;Multiple substitutions specified in non-positi
- tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e
- [Solved] Brew Install ffmpeg Error: tar: Error opening archive: Failed to open
- [Solved] Intellij IDEA Error: Command line is too long