desword / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
1 stars 0 forks source link

Android Studio SDK 21 generated APK fails #756

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the latest Android Studio
2. Create a new project with Fragments, min and target SDKs set to 21 (lollipop)
3. java -jar apktool_2.0.0rc3.jar decode would work but build would fail with 
following error: 

/Users/d/Downloads/app-21/res/values-v21/styles.xml:3: error: Error retrieving 
parent for item: No resource found that matches the given name 
'@android:style/Widget.TextSuggestionsPopupWindow'.

Exception in thread "main" brut.androlib.AndrolibException: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec 
command: 
[/var/folders/_p/wjcgkfc56mb0ltmj28p5h4ch0000gn/T/brut_util_Jar_3107592593117088
373.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, 
--target-sdk-version, 21, --version-code, 1, --version-name, 1.0, -F, 
/var/folders/_p/wjcgkfc56mb0ltmj28p5h4ch0000gn/T/APKTOOL8027652814246187334.tmp,
 -0, arsc, -I, /Users/d/Library/apktool/framework/1.apk, -S, 
/Users/d/Downloads/app-21/res, -M, 
/Users/d/Downloads/app-21/AndroidManifest.xml]
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
    at brut.androlib.Androlib.buildResources(Androlib.java:374)
    at brut.androlib.Androlib.build(Androlib.java:277)
    at brut.androlib.Androlib.build(Androlib.java:250)
    at brut.apktool.Main.cmdBuild(Main.java:225)
    at brut.apktool.Main.main(Main.java:84)

What is the expected output? What do you see instead?
Should bundle successfully.

What version of the product are you using? On what operating system?
2.0 RC3 on Mac 10.10.2

Please provide any additional information below.
See the attached most basic APK that reproduces this problem. 

Original issue reported on code.google.com by attaurre...@gmail.com on 4 Feb 2015 at 9:23

Attachments:

GoogleCodeExporter commented 9 years ago
If you experience errors with undefined attributes. Try and remove the file at 
$HOME/apktool/framework/1.apk and re-run your command. Apktool's new internal 
framework will take its place and might resolve the error.

Original comment by pwe...@gmail.com on 5 Feb 2015 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. That solved the problem. 

On Mac it's $HOME/Library/apktool/framework/1.apk and on Yosimiti ~/Library/ 
folder is hidden by default. 

Is there a way where apktool automatically update this 1.apk file? Like a flag 
or something like that?

Original comment by attaurre...@gmail.com on 5 Feb 2015 at 8:17

GoogleCodeExporter commented 9 years ago
I have thought about it. Recording md5 hashes of previous frameworks, thus to 
know when to update.

However, nothing came of it. Every release I mention when its required to 
delete/update the framework. I will accept PRs though starting a WIP for this 
feature.

Original comment by connor.tumbleson on 5 Feb 2015 at 8:25

GoogleCodeExporter commented 9 years ago
What's a PR? How can I help?

Original comment by attaurre...@gmail.com on 5 Feb 2015 at 8:27