Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help changing AndroidManifest.xml in an APK file
    primarykey
    data
    text
    <p>I'm trying to make a minor change to AndroidManifest.xml using the APK Multi Tool (apktool). I am able to disassemble and make the change, but when I try to reassemble into a new APK, I get an error:</p> <pre><code>error: Error retrieving parent for item: No resource found that matches the given name 'Preference'. </code></pre> <p>I believe that the line in the styles.xml is:</p> <pre><code>&lt;style name="Preference.SwitchPreference"&gt; &lt;item name="android:layout"&gt;@layout/preference&lt;/item&gt; &lt;item name="android:widgetLayout"&gt;@layout/preference_widget_switch&lt;/item&gt; &lt;/style&gt; </code></pre> <p>Here is the full error log:</p> <pre><code>-------------------------------------------------------------------------- |Tue 12/10/2013 -- 23:18:05.27| -------------------------------------------------------------------------- java version "1.7.0_13" Java(TM) SE Runtime Environment (build 1.7.0_13-b20) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) I: Baksmaling... I: Loading resource table... I: Loaded. I: Decoding AndroidManifest.xml with resources... I: Loading resource table from file: C:\Users\Sean\apktool\framework\1.apk I: Loaded. I: Renamed manifest package found! Fixing... I: Decoding file-resources... I: Decoding values */* XMLs... I: Done. I: Copying assets and libs... I: Checking whether sources has changed... I: Smaling... I: Checking whether resources has changed... I: Building resources... C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\res\values\styles.xml:105: error: Error retrieving parent for item: No resource found that matches the given name 'Preference'. Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 17, -F, C:\Users\Sean\AppData\Local\Temp\APKTOOL1118131662295957481.tmp, -0, arsc, -I, C:\Users\Sean\apktool\framework\1.apk, -S, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\res, -M, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358) at brut.androlib.Androlib.buildResources(Androlib.java:283) at brut.androlib.Androlib.build(Androlib.java:206) at brut.androlib.Androlib.build(Androlib.java:176) at brut.apktool.Main.cmdBuild(Main.java:228) at brut.apktool.Main.main(Main.java:79) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 17, -F, C:\Users\Sean\AppData\Local\Temp\APKTOOL1118131662295957481.tmp, -0, arsc, -I, C:\Users\Sean\apktool\framework\1.apk, -S, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\res, -M, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336) ... 5 more Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 17, -F, C:\Users\Sean\AppData\Local\Temp\APKTOOL1118131662295957481.tmp, -0, arsc, -I, C:\Users\Sean\apktool\framework\1.apk, -S, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\res, -M, C:\Users\Sean\Downloads\APK-Multi-Tool\other\..\projects\Test.apk\AndroidManifest.xml] at brut.util.OS.exec(OS.java:89) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355) ... 6 more </code></pre> <p>Any idea on how to resolve this? Can I somehow build the APK without decompiling and compiling the code, since I'm not making a code change? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload