ANDRO icon indicating copy to clipboard operation
ANDRO copied to clipboard

APK Building Process Fails with Missing AppCompat Resources

Open AryanVBW opened this issue 7 months ago • 0 comments
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

  1. Use the web panel interface to build an APK
  2. Check the error log in the build history section
  3. 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.

AryanVBW avatar Apr 06 '25 03:04 AryanVBW