App Api Level 31 Issue Fixed

Hi There ,

App api level 31 issue fixed by manually

1. Build the APK in

Builder.niotron.com

image

2.Export the keystore

image

3. Open Apk Tool x

Apktool M APK - Download (Android App)

4. Set target SdkVersion = 31 & sign it

image

5. Decompile it.

image

6. Edit the Manifest and add

android:exported=“true”

image

to each <activity … > and <receiver … >.

7. Recompile it.

image

8.Convert Apk to Aab

image

Convert Done!

image

9.Open Zip Signer

ZipSigner 3.4 APK Download by Ken Ellinwood - APKMirror

image

image

image

image

password is android

image

key mode - androidkey & sign the file

Done

10.Check the app (APK) can be installed on your devices.

11.Now upload the aab file in google play console

Tutorial

Summary
  1. Build the APK

  2. Export the keystore

  3. Open Apk Tool x

  4. Set target SdkVersion = 31 & sign it

  5. Decompile it.

  6. Edit the Manifest and add android:exported=“true” to each <activity … > and <receiver … >.

  7. Recompile it.

  8. Convert Apk to Aab

  9. Open Zip Signer

  10. Check the app (APK) can be installed on your devices.

  11. Now upload the aab file in google play console

Thanks To
@Anke
@AppHelper_Studio

8 Likes

I am getting following error upon recompiling

I: Using Apktool M 2.4.0-210716
I: Checking whether sources has changed…
I: Smaling smali folder into classes.dex…
I: Checking whether sources has changed…
I: Smaling smali_assets folder into assets.dex…
I: Checking whether resources has changed…
I: Building resources…
I: Using aapt v1.
W: /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/AndroidManifest.xml:29: error: Error parsing XML: not well-formed (invalid token)
W:
W: a.a.b: a.b.a: could not exec (exit code = 1): [/data/user/0/ru.maximoff.apktool/files/bin/aapt_64, p, --min-sdk-version, 19, --target-sdk-version, 31, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /data/user/0/ru.maximoff.apktool/cache/APKTOOL1064485250517549322.tmp, -0, AndroidManifest.xml, -0, resources.arsc, -0, png, -0, arsc, -I, /data/user/0/ru.maximoff.apktool/files/framework/1.apk, -S, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/res, -M, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/AndroidManifest.xml]
W: a.a.b: a.b.a: could not exec (exit code = 1): [/data/user/0/ru.maximoff.apktool/files/bin/aapt_64, p, --min-sdk-version, 19, --target-sdk-version, 31, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /data/user/0/ru.maximoff.apktool/cache/APKTOOL1064485250517549322.tmp, -0, AndroidManifest.xml, -0, resources.arsc, -0, png, -0, arsc, -I, /data/user/0/ru.maximoff.apktool/files/framework/1.apk, -S, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/res, -M, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/AndroidManifest.xml]
W: a.a.a.a(Androlib.java:577)
W: a.a.a.a(Androlib.java:495)
W: a.a.a.d(Androlib.java:353)
W: a.a.a.a(Androlib.java:317)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:62)
W: ru.maximoff.apktool.c.a.a(AbstractTask.java:52)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:105)
W: ru.maximoff.apktool.c.a.doInBackground(Unknown Source:2)
W: android.os.AsyncTask$3.call(AsyncTask.java:394)
W: java.util.concurrent.FutureTask.run(FutureTask.java:266)
W: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W: java.lang.Thread.run(Thread.java:923)
W: a.b.a: could not exec (exit code = 1): [/data/user/0/ru.maximoff.apktool/files/bin/aapt_64, p, --min-sdk-version, 19, --target-sdk-version, 31, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /data/user/0/ru.maximoff.apktool/cache/APKTOOL1064485250517549322.tmp, -0, AndroidManifest.xml, -0, resources.arsc, -0, png, -0, arsc, -I, /data/user/0/ru.maximoff.apktool/files/framework/1.apk, -S, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/res, -M, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/AndroidManifest.xml]
W: a.a.c.a.a(AndrolibResources.java:459)
W: a.a.c.a.a(AndrolibResources.java:629)
W: a.a.a.a(Androlib.java:555)
W: a.a.a.a(Androlib.java:495)
W: a.a.a.d(Androlib.java:353)
W: a.a.a.a(Androlib.java:317)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:62)
W: ru.maximoff.apktool.c.a.a(AbstractTask.java:52)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:105)
W: ru.maximoff.apktool.c.a.doInBackground(Unknown Source:2)
W: android.os.AsyncTask$3.call(AsyncTask.java:394)
W: java.util.concurrent.FutureTask.run(FutureTask.java:266)
W: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W: java.lang.Thread.run(Thread.java:923)
W: could not exec (exit code = 1): [/data/user/0/ru.maximoff.apktool/files/bin/aapt_64, p, --min-sdk-version, 19, --target-sdk-version, 31, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /data/user/0/ru.maximoff.apktool/cache/APKTOOL1064485250517549322.tmp, -0, AndroidManifest.xml, -0, resources.arsc, -0, png, -0, arsc, -I, /data/user/0/ru.maximoff.apktool/files/framework/1.apk, -S, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/res, -M, /storage/emulated/0/Download/Gumtree (1)_mod_src (1)/AndroidManifest.xml]
W: a.d.f.a(OS.java:149)
W: a.a.c.a.a(AndrolibResources.java:455)
W: a.a.c.a.a(AndrolibResources.java:629)
W: a.a.a.a(Androlib.java:555)
W: a.a.a.a(Androlib.java:495)
W: a.a.a.d(Androlib.java:353)
W: a.a.a.a(Androlib.java:317)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:62)
W: ru.maximoff.apktool.c.a.a(AbstractTask.java:52)
W: ru.maximoff.apktool.c.s.a(BuildTask.java:105)
W: ru.maximoff.apktool.c.a.doInBackground(Unknown Source:2)
W: android.os.AsyncTask$3.call(AsyncTask.java:394)
W: java.util.concurrent.FutureTask.run(FutureTask.java:266)
W: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W: java.lang.Thread.run(Thread.java:923)
I: Time spent: 00:00:32.17

share your apk…let me see

Hellow.
When i change API to 31 app crush when open how to fix

Try to use the Beta server (which already targets SDK 31).

1 Like

Is it very important for us to do this update 31? If so, when is the last date? What are the benefits of updating our app?

1 Like
1 Like

After 2.7.0 Update Still I Am Unable to Publish My App . Above image error showing please help @Anke

Build the APK and post it.

1 Like

Untitled
See This @Anke

Pleas Slove This Problem @Anke

As you can see, these are different issues.

So again:

1 Like

See also here:

Any Official Solution SDK 31

Read my posts carefully.
There is no “Official Solution” and there never will be.

Android 12 changes - #2 by Anke - Extension Development - MIT App Inventor Community