Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was following this android tutorial How To Create An Android Icon Pack App – Prototypr[^]. When I imported the project to Android Studio and built it I got the following error android - Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated - Stack Overflow[^].

I solved that as the answer was already mentioned there. After that when I tried to build the project I got the following error - Absolute path are not supported when setting an output file name.

When I opened the file in Android Studio, it showed that the error was occuring at the following code:
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            output.outputFileName = new File(
                    output.outputFile.parent, "MyIconPack-${variant.versionName}.apk")
        }
    }


Please help me to solve this error.

What I have tried:

I searched in StackOverflow and google, but can't find a proper solution.
Posted
Updated 26-Sep-18 5:05am
Comments
David Crow 26-Sep-18 10:21am    
See the suggestion here by user3155340.
[no name] 26-Sep-18 11:49am    
I already had referred it. Can you tell me how to edit my code to remove this error?
David Crow 26-Sep-18 11:56am    
Do you mean how to modify the app's build.gradle file?
[no name] 26-Sep-18 11:57am    
Yes.
David Crow 26-Sep-18 11:59am    
It's just a text file, and can be edited like any other right from within Android Studio (or whatever IDE you are using).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900