Skip to content

APK Tool GUI uses removed -nc flag with Apktool 3.x #52

@AyalX

Description

@AyalX

Prerequisites

  • This is not a support issue or a question. For support, questions, or help, see support links.
  • I performed a cursory search of the issue tracker on APK Tool GUI to avoid opening a duplicate issue
  • I am running the latest version of APK Tool GUI.
  • I have read the FAQ

Describe the bug

When building with APK Tool GUI v3.3.2.3 using Apktool 3.0.2, enabling “Disable crunching of resource files during the build step” causes the build to fail immediately.

APK Tool GUI appears to pass the old Apktool 2.x -nc option. Apktool 3.x no longer accepts -nc; the equivalent option is now --no-crunch.

Expected behavior:
APK Tool GUI should use --no-crunch when the configured Apktool version is 3.x, or otherwise map the checkbox to the correct flag for the selected Apktool version.

To Reproduce

  1. Open APK Tool GUI v3.3.2.3.
  2. Ensure you use Apktool 3.0.2.
  3. Go to the Build tab.
  4. Select a decompiled APK folder.
  5. Enable “Disable crunching of resource files during the build step”.
  6. Start the build.
  7. The build fails immediately with Unrecognized option: -nc.

Logs

[00:22:42] =====[ Build ]=====
[00:22:42] Input file: C:\Users\redacted
[00:22:42] Unrecognized option: -nc
[00:22:42] Apktool 3.0.2 - a tool for reengineering Android apk files
[00:22:42] with smali 3.0.9-dev and baksmali 3.0.9-dev
[00:22:42] Copyright 2010 Ryszard Wi?niewski brut.alll@gmail.com
[00:22:42] Copyright 2010 Connor Tumbleson connor.tumbleson@gmail.com
[00:22:42] Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
[00:22:42] General options:
[00:22:42] -q,--quiet Suppress normal output.
[00:22:42] -v,--verbose Increase output verbosity.
[00:22:42] apktool b|build [options]
[00:22:42] --aapt Use aapt2 binary located in .
[00:22:42] =====[ Error ]=====
[00:22:42] Compiling failed
[00:22:42] Time started: 00:22:42
[00:22:42] Time elapsed: 00:00

APK

Not relevant.

APK Tool GUI version

v3.3.2.3

Apktool version

3.0.2

Java version

21.0.11

Operating system and version

Windows 11

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