Skip to content

Android resource linking failed (Failed to load include path) #14

Open

Description

@KonerDev

Issue Checklist

  • I confirm that this issue is not a duplicate and hasn't been reported before.
  • I agree to follow the project's code of conduct.
  • I have checked and verified that I am using the latest version of AndroidIDE from GitHub or F-Droid.

Additional terms

  • I understand that providing incomplete or inaccurate information may result in the issue being closed.
  • I agree to provide all requested details promptly for a comprehensive bug report.

Issue explanation

I get an error message when building my app (It works normally on Windows with Android Studio) . These are the most important files:

build.gradle

plugins {
    alias(libs.plugins.android.application)
}

android {
    namespace 'com.example.app'
    compileSdk 35

    defaultConfig {
        applicationId "com.example.app"
        minSdk 24
        targetSdk 35
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
        coreLibraryDesugaringEnabled true
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation libs.appcompat
    implementation libs.material
    implementation libs.activity
    implementation libs.constraintlayout
    implementation libs.navigation.fragment
    implementation libs.navigation.ui
    implementation libs.preference
    implementation libs.legacy.support.v4
    implementation libs.recyclerview
    implementation libs.core
    implementation libs.editor
    implementation libs.language.textmate
    coreLibraryDesugaring libs.desugar.jdk.libs

    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
}

gradle-wrapper.properties

#Wed Jan 29 16:11:26 CET 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

libs.versions.toml

[versions]
agp = "8.8.2"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
appcompat = "1.7.0"
material = "1.12.0"
activity = "1.10.1"
constraintlayout = "2.2.1"
navigationFragment = "2.8.8"
navigationUi = "2.8.8"
preference = "1.2.1"
legacySupportV4 = "1.0.0"
recyclerview = "1.4.0"
core = "6.0.0"
editor = "0.23.5"
languageTextmate = "0.23.5"
desugar_jdk_libs = "2.1.5"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }
preference = { group = "androidx.preference", name = "preference", version.ref = "preference" }
legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "legacySupportV4" }
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
core = { group = "com.github.topjohnwu.libsu", name = "core", version.ref = "core" }
editor = { group = "io.github.Rosemoe.sora-editor", name = "editor", version.ref = "editor" }
language-textmate = { group = "io.github.Rosemoe.sora-editor", name = "language-textmate", version.ref = "languageTextmate" }
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

If you need more files, don't hesitate to ask me!

Expected behavior

The building task should work without any issues.

Version name

Version : v1.0.0-internal (10002)
CI Build : true
Branch : dev
Commit : ebf0f81
Variant : arm64-v8a (release)
Build type : UNOFFICIAL
F-Droid Build : false
F-Droid Version : null
F-Droid Version code : -1
SDK Version : 34
Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi]
Manufacturer : samsung
Device : SM-A336B

Download source

GitHub

Relevant log output

Tasks ausführen : [:app:assembleDebug]

> Configure project :app
WARNING: The option setting 'android.aapt2FromMavenOverride=/data/user/0/com.itsaky.androidide/files/home/.androidide/aapt2' is experimental.
Adding LogSender dependency (version '2.7.1-beta') to variant 'debug' of project ':app'

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:generateDebugResValues
> Task :app:dataBindingMergeDependencyArtifactsDebug
> Task :app:generateDebugResources
> Task :app:packageDebugResources
> Task :app:javaPreCompileDebug
> Task :app:parseDebugLocalResources
> Task :app:mapDebugSourceSetPaths
> Task :app:checkDebugAarMetadata
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :app:mergeDebugResources
> Task :app:processDebugMainManifest
> Task :app:dataBindingGenBaseClassesDebug
> Task :app:processDebugManifest
> Task :app:mergeDebugShaders
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets
> Task :app:desugarDebugFileDependencies
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:compressDebugAssets
> Task :app:mergeDebugJniLibFolders
> Task :app:checkDebugDuplicateClasses
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:mergeDebugJavaResource
> Task :app:processDebugManifestForPackage
> Task :app:mergeExtDexDebug
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:mergeLibDexDebug
> Task :app:validateSigningDebug
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> 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/user/0/com.itsaky.androidide/files/home/android-sdk/platforms/android-35/android.jar.
     
         

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 4m 53s
28 actionable tasks: 28 executed

Activity

  1. KonerDev commented on Mar 1, 2025

    @KonerDev
    Author

    After doing some research, I found out that it's probably because the compileSdk version is set to 35, while AndroidIDE only has Android SDK 34.x. If I set the compileSdk and targetSdk to 33, it works without any issues. When will a newer Android SDK be supported?

  2. youfeng11 commented on May 31, 2025

    @youfeng11

    Replace aapt2 with sdk35

  3. KonerDev commented on Jun 6, 2025

    @KonerDev
    Author

    Replace aapt2 with sdk35

    I already tried to replace the files under ~/.android-sdk/build-tools/35.0.0 with the files from this repo like someone pointed out in #19.
    The same error still occured

    Then I also replaced the aapt2 file under ~/.androidide/aapt2 with the one from the repo.
    Now I get this error:

    Execution failed for task ':app:processDebugResources'.
    > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
       > AAPT2 .androidide Daemon #0: Daemon startup failed
         This should not happen under normal circumstances, please file an issue if it does.
    

    What do I do wrong?

  4. kkgit2008 commented on Oct 2, 2025

    @kkgit2008

    @KonerDev Have u resolved this?

  5. smitgaming54-sys commented on Aug 2, 2026

    @smitgaming54-sys

    AndroidIDE is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    AndroidIDE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with AndroidIDE. If not, see https://www.gnu.org/licenses/.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy