Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,106 Members 40,874 Now Online
XDA Developers Android and Mobile Development Forum

[Q] apktool recompilation error!

Tip us?
 
keshav13
Old
(Last edited by keshav13; 27th May 2014 at 01:30 PM.)
#1  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: May 2014
Question [Q] apktool recompilation error!

While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd. This is unedited folder, and trying to compile it right after de-compilation. But still getting error.

I have tried different aapt, different apktool.jar, both java 6 and 7 and such but to no avail.

Quote:
D:\apktool\112233>apktool b 11 wert.apk
I: Using Apktool 2.0.0-Beta9 on 11
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\apktool\112233\11\res\layout\photo_selector_vie w_popup.xml:9: error: Error: No resource found tha
t matches the given name (at 'layout' with value '@layout/photo_updates_header').
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\112233\11\res; found: zh_SG
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.co
mmon.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\brut_util_Jar_7 378085
831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 19, --ve
rsion-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL365
2482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:\Users\Keshav\apkto
ol\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:435)
at brut.androlib.Androlib.buildResources(Androlib.jav a:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\U
sers\Keshav\AppData\Local\Temp\brut_util_Jar_73780 85831899028208.tmp, p, --forced-package-id, 127, --
min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB
8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL36524827 45200459136.tmp, -0, arsc, -I, C:\Users\Kesh
av\apktool\framework\1.apk, -I, C:\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res
,-M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\bru
t_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk
-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Loc
al\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:
\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\Android
Manifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:464)
... 6 more


If I import this raw project into Eclipse I get these 5 errors:


Quote:
Description Resource Path Location Type
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values line 95 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 661 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 63 Android AAPT Problem

Although not the right thing to do, I can remove the line with 'android:actionBarNonEmbeded' in them in Eclipse and there is no problem after deleting those 3 lines. But can't simply delete lines with 'android:searchViewTextField' as it throws up too many other errors, mostly same for other attrs.

I have surfed tons of pages at stackoverflow, xda and some other sites... but couldn't crack a solution. Can't add a simple + to @drawable either, obviously.

Reply by connor.tumbleson here on code.google.com might be answer but I couldn't figure out what to do.
url - code.google.com/p/android-apktool/issues/detail?id=441#c20

So, uh, pls help!

Note: Of course, I'm installing the framreworks first (framework-res.apk, twframework-res.apk and systemUI.apk). And have tried apkMultiTool v3.4 and some other apktool based solutions too. Nothing helped.
 
_alex74_
Old
#2  
_alex74_'s Avatar
Recognized Themer
Thanks Meter 1336
Posts: 692
Join Date: Nov 2012
Location: FVG

 
DONATE TO ME
Quote:
Originally Posted by keshav13 View Post
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha

try this and report
Galaxy S4Galaxy TAB3

 
keshav13
Old
(Last edited by keshav13; 28th May 2014 at 12:41 PM.) Reason: Asking for a way on how to remove the reference.
#3  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: May 2014
Default worked but didn't work!

Quote:
Originally Posted by _alex74_ View Post
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha

try this and report
First of all, thansk for the tip!

I removed the layout portion of that line that actually made reference to photo_updates_header file. So, that actually didn't got me those error, but it didn;t build an APK file despite showing exactly that in cmd. Here's what cmd says:

D:\apktool>apktool b c1 111.apk
I: Using Apktool 2.0.0-Beta9 on c1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\c1\res; found: zh_SG
I: Building apk file...
I: Copying unknown files/dir...

There is no APK file built, tho. Which is bad, and surprising. What do you suggest?
[I'm using apktool 2.0 beta9, and have Java 7 installed on Win8.1.]

Edit:
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
 
_alex74_
Old
#4  
_alex74_'s Avatar
Recognized Themer
Thanks Meter 1336
Posts: 692
Join Date: Nov 2012
Location: FVG

 
DONATE TO ME
Quote:
Originally Posted by keshav13 View Post
First of all, thansk for the tip!

Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.

that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
Quote:
<string name="photo_updates_header">photo updates header</string>
in res/values/strings.xml on bottom of all strings

lemme know
Galaxy S4Galaxy TAB3

 
keshav13
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: May 2014
Default Nope :/

Quote:
Originally Posted by _alex74_ View Post
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.

that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:


in res/values/strings.xml on bottom of all strings

lemme know
Hi _alex74_,

Adding the line <string name="photo_updates_header">photo updates header</string> didn't work. Very sad.
Please suggest something else.

Can you reproduce the problem at your end? Can you recompile it or not even when it's untouched?
Here's the link to contacts APK that's been torturing me: __www24.zippyshare.com/v/59685951/file.html__

Thanks a lot!
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes