Waqas Ahmed
Waqas Ahmed

Reputation: 23

Error building apk using apktool

I am trying to decompile and then recompile an apk using apktool. I used apktool like this: enter image description here

No changes made to the files. I just decompiled and recompiled them but apktool is showing error. The problem persists when i do make some changes to the xml files. What should I do now?

Regards

Upvotes: 2

Views: 3271

Answers (2)

Ravinder Bhandari
Ravinder Bhandari

Reputation: 2636

I am answering this just in case somebody gets stuck with same problem. If you are not concerned about resources of apk you can skip the extraction of resources by using the following command

apktool d -r my_app.apk

this command will skip the decompling of res folder.

Upvotes: 4

Connor Tumbleson
Connor Tumbleson

Reputation: 3330

That problem is caused by apktool improperly decoding some positional XML elements. You can fix this manually by adding `formatted="false" to all those lines that it errors on or wait for Apktool 2.0 (set for a release in about 1.5 months).

We added about 25 unit tests for this exact problem and hopefully this example is fixed on 2.0. You may build 2.0 from source and test this.

Upvotes: 0

Related Questions