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

[Bug]: aapt2 fails to compile project targeting api 35. #22667

Open
Anonymous2716 opened this issue Dec 23, 2024 · 6 comments
Open

[Bug]: aapt2 fails to compile project targeting api 35. #22667

Anonymous2716 opened this issue Dec 23, 2024 · 6 comments
Labels
bug report Something is not working properly untriaged

Comments

@Anonymous2716
Copy link

Anonymous2716 commented Dec 23, 2024

Problem description

Android gradle projects with targetSdk and compile Sdk set to 35 fails fo compile with an error messsge:

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR: AAPT: error: failed to load include path /data/data/com.termux/files/home/Android/Sdk/platforms/android-35/android.jar.

but api 34 compiles fine.

this is in the gradle.properties :

android.aapt2FromMavenOverride=/data/data/com.termux/files/usr/bin/aapt2

gradle version : 8.12
AGP version : 8.7.3
kotlin version : 2.1.0

but issue exists on below version's as well.

What steps will reproduce the bug?

compile an Android project with targetSdk and compileSdk 35.

What is the expected behavior?

No response

System information

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/~~8mLAdd6wbSRLV0V32h4Sig==/com.termux-2dCX2aNV2QeibiYiVDtyjw==/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1020
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.1
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=25548
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.1
TERMUX__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c24,c257,c512,c768
TERMUX__SE_INFO=default:targetSdkVersion=28:complete
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c24,c257,c512,c768
TERMUX__UID=10280
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://grimler.se/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://grimler.se/termux/termux-x11 x11 main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
lxqt-session/x11 2.1.1 aarch64 [upgradable from: 2.1.0]
termux-tools version:
1.44.6
Android version:
14
Kernel build information:
Linux localhost 4.19.191-perf-g3d26763ea28e #1 SMP PREEMPT Mon Oct 14 13:51:09 UTC 2024 aarch64 Android
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.x11 versionCode:15
com.termux.api versionCode:51
@Anonymous2716 Anonymous2716 added bug report Something is not working properly untriaged labels Dec 23, 2024
@twaik twaik changed the title [Bug]: aapt2 fails to compile project tsrgeting api 35. [Bug]: aapt2 fails to compile project targeting api 35. Dec 23, 2024
@twaik
Copy link
Member

twaik commented Dec 23, 2024

What is output for ls -la ~/Android/Sdk/platforms/android-35/android.jar?

@Anonymous2716
Copy link
Author

Anonymous2716 commented Dec 23, 2024

@twaik i have platforms;android-35 and the file exists . it is 26 Megabytes in size.

maybe it needs updates?

@Anonymous2716
Copy link
Author

Anonymous2716 commented Dec 29, 2024

current package is from android-13.0.0 r6 of AOSP but there is android-15.0.0 r9 available.

@RichardLuo0
Copy link

I have the same issue. Haven't tested API34, but can be reproduced with API 35.
Btw, what's the sdk version for the bundled android.jar? Its much smaller than the one in android sdk. How is it generated?

@RichardLuo0
Copy link

I can confirm it works for api 34

@Anonymous2716
Copy link
Author

@RichardLuo0 even if I replace the one with the included android.jar still the same issue . I suspect upgrading the package should resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly untriaged
Projects
None yet
Development

No branches or pull requests

3 participants