lnln1111 / android-apktool

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

Trying to build a apk #332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. unzip a flash-able zip for galaxy nexus
2. decompile framework-res and edit a resolution
3.try apktool b framework-res to rebuild .apk for zip 

What is the expected output? What do you see instead?
Building the APK

Vincents-MacBook-Air:downloads vincentdinculescu$ apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
    (skipping hidden file '/Users/vincentdinculescu/Downloads/framework-res/res/.DS_Store')
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/anim-sw720dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/drawable-sw600dp-nodpi
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/drawable-sw600dp-xhdpi
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/drawable-sw720dp-nodpi
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/layout-sw600dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/layout-sw720dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/layout-w600dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-h720dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw600dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw600dp-land
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw600dp-w960dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw720dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw720dp-land
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw720dp-port
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-sw720dp-w1280dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-w360dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-w480dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-w500dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-w600dp
invalid resource directory name: 
/Users/vincentdinculescu/Downloads/framework-res/res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: 
brut.common.BrutException: could not exec command: [aapt, p, -F, 
/var/folders/hw/7n7686ms0gq9d5hkf7gbytlw0000gn/T/APKTOOL5240608206710831112.tmp,
 -x, -S, /Users/vincentdinculescu/Downloads/framework-res/res, -M, 
/Users/vincentdinculescu/Downloads/framework-res/AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
    at brut.androlib.Androlib.buildResources(Androlib.java:248)
    at brut.androlib.Androlib.build(Androlib.java:171)
    at brut.androlib.Androlib.build(Androlib.java:154)
    at brut.apktool.Main.cmdBuild(Main.java:182)
    at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, 
/var/folders/hw/7n7686ms0gq9d5hkf7gbytlw0000gn/T/APKTOOL5240608206710831112.tmp,
 -x, -S, /Users/vincentdinculescu/Downloads/framework-res/res, -M, 
/Users/vincentdinculescu/Downloads/framework-res/AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:83)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
    ... 6 more

What version of the product are you using? On what operating system?
MAC OS X 10.7.4

Please provide any additional information below.

Original issue reported on code.google.com by vdin...@gmail.com on 5 Jul 2012 at 2:46

GoogleCodeExporter commented 9 years ago
I am having the same issue ( i am also using MAC OS X 10.7.4)

Original comment by smithben...@gmail.com on 1 Aug 2012 at 7:34

GoogleCodeExporter commented 9 years ago
EDIT: turned out one of the image files i used had an invalid character (space) 
and it worked o.0  I also recommend downloading the latest version of platform 
tools and replacing the old aapt with one in the tools package.

Original comment by smithben...@gmail.com on 1 Aug 2012 at 8:03

GoogleCodeExporter commented 9 years ago
aapt is out of date. Not an Apktool bug. Please download updated aapt from 
Android SDK.

Original comment by connor.tumbleson on 16 Nov 2012 at 12:58