ANDRO
ANDRO copied to clipboard
APK Building Process Fails with Missing AppCompat Resources
trafficstars
Description
The APK building process consistently fails due to missing AppCompat and MaterialComponents resources referenced in the styles.xml file. This causes build errors when attempting to recompile decompiled APKs.
Current Behavior
When running the build command:
java -jar "/path/to/apktool.jar" b "/path/to/decompiled" -o "/path/to/build.apk"
The following errors are produced:
W: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
W: Error: No resource found that matches the given name: attr 'colorAccent'.
W: Error: No resource found that matches the given name: attr 'colorPrimary'.
W: Error: No resource found that matches the given name: attr 'colorPrimaryDark'.
Expected Behavior
The APK should build successfully with appropriate fallback styles that don't rely on external resources.
Reproduction Steps
- Use the web panel interface to build an APK
- Check the error log in the build history section
- Observe the build failure with missing resource errors
Proposed Fix
Modify the styles.xml file to use simplified style definitions that don't rely on AppCompat or MaterialComponents themes:
<style name="AppTheme">
<item name="android:windowBackground">@android:color/white</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">false</item>
</style>
Additional Context
This error occurs because the decompiled APK is referencing resources from Android support libraries that are not included in the decompiled files.