Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:AAPT: unknown option '--source-path' #26

Open
arcans opened this issue Sep 17, 2021 · 6 comments
Open

ERROR:AAPT: unknown option '--source-path' #26

arcans opened this issue Sep 17, 2021 · 6 comments

Comments

@arcans
Copy link

arcans commented Sep 17, 2021

I am using Gradle 7.2, Android Gradle Plugin 7.0.1, and JDK17 in Termux Android

In your repo, I downloaded appt2 Android 11(for arch) as replacement in my existing aapt2.

Upon building using "gradle build", it was successful.
But after adding any androidx dependency, it failed with the error below:

`AAPT2 aapt2-7.0.1-7396180-linux Daemon #0: shutdown
AAPT2 aapt2-7.0.1-7396180-linux Daemon #1: shutdown
FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:mergeReleaseResources'.

Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
Android resource compilation failed ERROR:AAPT: unknown option '--source-path'.`

Seems like aapt2 does not support --source-path option
Can you please add new option?

@JonForShort
Copy link
Owner

Hi @arcans , would you mind pasting the entire command that gradle is executing? Thanks!

@arcans
Copy link
Author

arcans commented Nov 2, 2021

gradle assembleDebug

@iyxan23
Copy link

iyxan23 commented Nov 11, 2021

It's because the aapt2 binary is outdated with the AGP version you're using.

@freindlytech
Copy link

Me also getting this error

@victorwads
Copy link

I'm also getting this error on Newer projects. Using old Projects with old gradlew versions work in some projects.

I really have no idea of how to build a new version of aapt2 like for andrid 12/13.

@JonForShort Can u Save us building a new version?

@JonForShort
Copy link
Owner

Hi @victorwads , I am sorry but I haven't had much time to dedicate to this project.

If you'd like to try building the binaries yourself, please take a look at the modifications I have made to the AOSP build scripts (https://github.com/JonForShort/android-tools/tree/master/patch). For Android 12 and 13, you will most likely need to make similar changes.

If you haven't ever built the AOSP project, you should get familiar with this process first (https://source.android.com/setup/build).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants