Error: Exception in thread “main” brut.androlib.AndrolibException: unsupported res type name for bags. Found: style2

When i was using apktool to decompile an apk i got the following error:

The problem:

The solution:

Download the source of APKTool

  1. git clone git://github.com/iBotPeaches/Apktool.git
  2. cd Apktool
    Bold lines need to be added:
    Edit: Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java

Edit: Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTypeSpec.java

Then continue building steps, copied from (https://ibotpeaches.github.io/Apktool/build/):

  1. For steps 3-5 use ./gradlew for unix based systems or gradlew.bat for windows.
  2. [./gradlew][gradlew.bat] build shadowJar – Builds Apktool, including final binary.
  3. Optional (You may build a Proguard jar) [./gradlew][gradlew.bat] build shadowJar proguard

The new apktool.jar will be in (Apktool/brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar)

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright PowerMinded 2019
Tech Nerd theme designed by FixedWidget