Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

[BUG] Resources$NotFoundException

Open proukornew opened this issue 2 years ago • 3 comments

Information

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

Stacktrace/Logcat

07-12 12:31:11.459 26190 26190 E AndroidRuntime: Process: com.digibites.accubattery, PID: 26190
07-12 12:31:11.459 26190 26190 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.digibites.accubattery/com.digibites.abatterysaver.BatterySaverActivity}: android.content.res.Resources$NotFoundException: File aod from xml type layout resource ID #0x7f0c001c

Steps to Reproduce

  1. apktool decode&build

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

link

Questions to ask before submission

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

yes yes yes

proukornew avatar Jul 12 '22 07:07 proukornew

Not sure right now.

The resource is in the application, so it does point at Apktool messing something up.

➜  2849 aapt d resources Accu<200b>Battery_v1.5.1.1_apkpure.com.apk --values | grep '0x7f0c001c'
      spec resource 0x7f0c001c com.digibites.accubattery:layout/: flags=0x00000000
        resource 0x7f0c001c com.digibites.accubattery:layout/: t=0x03 d=0x00002076 (s=0x0008 r=0x00)

iBotPeaches avatar Aug 06 '22 21:08 iBotPeaches

@iBotPeaches I also encountered this error when I built the APK using Android Gradle plugin version 4.2.2, but it was solved when I used 4.0.2.

mikorobyo avatar Jul 05 '23 19:07 mikorobyo