question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IllegalStateException after installing the recompiled apk

See original GitHub issue

Information

  1. Apktool Version (apktool -version) -2.3.4
  2. Operating System (Mac, Linux, Windows) -Windows
  3. APK From? (Playstore, ROM, Other) -Other

Stacktrace/Logcat

java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android'
        at o.jna.eN(SourceFile:73)
        at o.jna.eN(SourceFile:54)
        at o.jkm.eN(SourceFile:373)
        at o.jnr.eN(SourceFile:25)
        at o.jiu.eN(SourceFile:1109)
        at o.jix.eN(Unknown Source)
        at o.jiy.eN(SourceFile:47)
        at o.jix.eN(Unknown Source)
        at com.teslacoilsw.launcher.preferences.fragments.SettingsNova.Ea(SourceFile:119)
        at o.qx.Ba(SourceFile:2498)
        at o.rn.eN(SourceFile:1501)
        at o.rn.declared(SourceFile:1784)
        at o.rn.eN(SourceFile:1852)
        at o.rn.declared(SourceFile:3269)
        at o.rn.NN(SourceFile:3241)
        at o.ri.k5(SourceFile:223)
        at androidx.fragment.app.FragmentActivity.k5(SourceFile:538)
        at androidx.fragment.app.FragmentActivity.onPostResume(SourceFile:527)
        at androidx.appcompat.app.AppCompatActivity.onPostResume(SourceFile:172)
        at android.app.Activity.performResume(Activity.java:6748)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4037)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4125)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3284)
        at android.app.ActivityThread.access$1000(ActivityThread.java:219)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1735)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:145)
        at android.app.ActivityThread.main(ActivityThread.java:6959)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Steps to Reproduce

  1. apktool d nova_6.0-beta14-59915.apk
  2. apktool b nova_6.0-beta14-59915
  3. Install and run the launcher
  4. Try to open it again when using the launcher’s home

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files (.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it. https://www.apkmirror.com/apk/teslacoil-software/nova-launcher/nova-launcher-6-0-beta14-release/nova-launcher-6-0-beta14-android-apk-download/

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?Yes
  2. If you are trying to install a modified apk, did you resign it?
  3. Are you using the latest apktool version?Yes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
dbauduincommented, Aug 12, 2019

This can be fixed by copying the files from original/META-INF to the APK dir’s META-INF folder. The following files should be excluded though: *.MF, *.SF, *.RSA.

There is also a command line option c that copies the original manifest and META-INF folder. Though it might not work if you made changes to the manifest.

It was not enough clear for me and I spent several minutes to find how to do it the right way, so if it can help others like me before the next release fixing this issue: it is necessary to copy the folder original/META-INF/services/ into build/apk/META-INF/ (not into META-INF/ at the root).

3reactions
adibfaracommented, May 30, 2019

This issue will be fixed by this MR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.IllegalStateException: endPosTable already set ...
I trying to compile the latest android source code and I am using the most current jdk available (jdk-8u5-linux-x64.gz) and very late in...
Read more >
Caused by: java.lang.IllegalStateException: package not ...
I think this happens when you run the app from eclipse while you already have the previous version installed ? This won't happen...
Read more >
App crashes: Android 8.0 Background execution limits - B4X
I have been debugging for 5 days now, and have no idea what is causing the issue. I have tried to debug every...
Read more >
Debugging and reviewing your Android dependencies with ...
Recompile and run the app. Does the bug occur? If it does, then that means it is caused by the instrumentation of at...
Read more >
Decompiling and Recompiling APK leads to crash using Apktool
Apktool says everything goes fine, but when the recompiled apk is installed it crashes instantly. pastebin.com/zBJWdWYg is the link to the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found