0

After updating the project, the build on Windows fails on the :app:mergeDebugResources task:

Execution failed for task ':app:mergeDebugResources'.
> Resource compilation failed (Failed to compile values resource file .../merged.dir/values/values.xml. Cause: java.nio.file.InvalidPathException: Illegal char <:> at index 43: com.lightrp.game.app-mergeDebugResources-27:/values/values.xml)

What I've tried:

  • Cleared the Gradle cache (.gradle)
  • Removed libraries one by one
  • Changed Gradle and AGP versions
  • Rolled back commits

Nothing helps. It looks like there's a path issue in Windows; the : in the folder name is interfering with the build. I don't understand where this character is coming from or how to remove it.

Versions:

  • OS: Windows 11
  • Gradle: 8.5
  • Android Gradle Plugin: 8.2.2
  • Java: 17

Question: Has anyone encountered the InvalidPathException on Windows when building an Android project? How can I resolve this issue and get mergeDebugResources working?

UPD: Maybe the build.gradle configuration is relevant — here’s my current setup:

plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
}

android {
    namespace 'com.lightrp.game'
    compileSdk 30

    defaultConfig {
        applicationId 'com.weiktongamesbrp.game'
        minSdk 23
        targetSdk 25
        versionCode 14
        versionName "1.4"

        vectorDrawables.useSupportLibrary = true

        ndk {
            abiFilters 'armeabi-v7a'
        }

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.tuyenmonkey:mkloader:1.4.0'
    implementation group: 'org.ini4j', name: 'ini4j', version: '0.5.4'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation "com.github.skydoves:colorpickerpreference:2.0.4"
    implementation 'com.github.egslava:edittext-mask:1.0.6'
    testImplementation 'junit:junit:4.12'
    implementation platform('com.google.firebase:firebase-bom:32.0.0')
    implementation 'com.akexorcist:round-corner-progress-bar:2.2.0'
    implementation 'com.github.hzy3774:AndroidP7zip:v1.7.1'
    implementation 'com.liulishuo.filedownloader:library:1.7.7'
    implementation 'com.makeramen:roundedimageview:2.3.0'
    implementation "com.liulishuo.okdownload:okdownload:1.0.3"
    implementation 'net.lingala.zip4j:zip4j:1.3.2'
    implementation 'com.github.bumptech.glide:glide:4.15.1'
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.github.GrenderG:Toasty:1.5.2'
    implementation 'com.github.Triggertrap:SeekArc:v1.1'
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.