Skip to content

APK Building Process Fails with Missing AppCompat Resources #17

Description

@AryanVBW

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions