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.

App crashes on 2.4.0, does not crash on 2.3.4

See original GitHub issue

Information

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

Stacktrace/Logcat

03-06 10:30:41.516 E/AndroidRuntime(29350): FATAL EXCEPTION: main
03-06 10:30:41.516 E/AndroidRuntime(29350): Process: com.ghostsq.commander, PID: 29350
03-06 10:30:41.516 E/AndroidRuntime(29350): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ghostsq.commander/com.appdome.ui.LoginActivity}: android.view.InflateException: Binary XML file line #13: Binary XML file line #13: Error inflating class <unknown>
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.os.Handler.dispatchMessage(Handler.java:106)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.os.Looper.loop(Looper.java:164)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at java.lang.reflect.Method.invoke(Native Method)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-06 10:30:41.516 E/AndroidRuntime(29350): Caused by: android.view.InflateException: Binary XML file line #13: Binary XML file line #13: Error inflating class <unknown>
03-06 10:30:41.516 E/AndroidRuntime(29350): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class <unknown>
03-06 10:30:41.516 E/AndroidRuntime(29350): Caused by: java.lang.reflect.InvocationTargetException
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at java.lang.reflect.Constructor.newInstance0(Native Method)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.createView(LayoutInflater.java:647)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:419)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.Activity.setContentView(Activity.java:2669)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.appdome.ui.LoginActivity.onCreate(LoginActivity.java:49)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.Activity.performCreate(Activity.java:7009)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.Activity.performCreate(Activity.java:7000)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.os.Handler.dispatchMessage(Handler.java:106)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.os.Looper.loop(Looper.java:164)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at java.lang.reflect.Method.invoke(Native Method)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-06 10:30:41.516 E/AndroidRuntime(29350): Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=0
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at java.lang.String.charAt(Native Method)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:107)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.content.res.TypedArray.getInt(TypedArray.java:375)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.widget.TextView.<init>(TextView.java:1289)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.widget.EditText.<init>(EditText.java:88)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.widget.EditText.<init>(EditText.java:84)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	at android.widget.EditText.<init>(EditText.java:80)
03-06 10:30:41.516 E/AndroidRuntime(29350): 	... 33 more
03-06 10:30:41.519 W/ActivityManager(  791):   Force finishing activity com.ghostsq.commander/com.appdome.ui.LoginActivity

Steps to Reproduce

  1. apktool d (with apktool 2.4.0)
  2. apktool b(with apktool 2.3.4)
  3. sign, install, run the application (adb shell monkey -p com.ghostsq.commander -c android.intent.category.LAUNCHER 1)

Notes:

  1. If I use apktool 2.3.4 to perform apktool d, the application doesn’t crash (no matter which apktool version is used to close the apk back again)
  2. When comparing the open directories, there is a difference in the res/values/ids.xml file, in apktool 2.3.4 some ids have false values, in apktool 2.4 these ids have empty values. When using the file from 2.3.4 the app loads.

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.dropbox.com/s/bpqb8d09rnrt4ij/orig.apk?dl=0

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? yes
  3. Are you using the latest apktool version? yes

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iBotPeachescommented, Mar 6, 2019

Classic Android

https://github.com/iBotPeaches/Apktool/commit/f997e0aff144d27dd5bedc62a27814f4a0b59367

AAPT2 only allows ids in the form of:

<item type=id" name="my_id/>
<item type=id" name="my_id></item>
<item type=id" name="my_id>@id/other_id</item> <!-- @id/my_id is a reference to @id/other_id -->

You probably have some other text in your inner xml element.

So looks like this is different between aapt1/aapt2, but even stranger that the host machine crashes with empty.

0reactions
AndnixSHcommented, May 15, 2019

Oh ok

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes when navigating to a composable and setting the ...
App crashes when navigating to a composable and setting the inclusive parameter to true when calling popUpTo(route) in navigation-compose 2.4.0-alpha05. 25
Read more >
Creating a ViewModel causes the app to crash. (Kotlin ...
Every time I include the above line and launch the app, the app crashes, and my phone cannot open it. Commenting out the...
Read more >
App crashing immediately on start up after upgrading to iOS12.
Running fine in simulator but crashes in device. No crash logs recorded. In line error shown after launching the app Thread 1: EXC_BAD_ACCESS...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:90687 - "app-emulation/bochs: ebuild does not support pci nor pcidev ... Bug:358519 - "media-sound/amarok-2.4.0 crash on gui display after last ...
Read more >
6 Crashing JVM - Oracle Help Center
A Java application might stop running for several reasons. ... Verify that the binary crash file size has not been limited with 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