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

Fire App Builder will not Finish Install #59

Open
StevenEsqTwo opened this issue Mar 15, 2020 · 3 comments
Open

Fire App Builder will not Finish Install #59

StevenEsqTwo opened this issue Mar 15, 2020 · 3 comments

Comments

@StevenEsqTwo
Copy link

I have followed all the the directions at https://developer.amazon.com/docs/fire-app-builder/download-and-build.html and run all of the updates when prompted. I have "cleaned" and "rebuilt" the project numerous times but still no dice. Any feedback is appreciated.

Here's the error:

Caused by: groovy.lang.GroovyRuntimeException: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[], versionCode=10, versionName=1.0.7}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.

More Details:

FAILURE: Build failed with an exception.

  • Where:
    Script 'E:\Git\fire-app-builder\Application\artifacts.gradle' line: 19

  • What went wrong:
    A problem occurred configuring project ':app'.

groovy.lang.GroovyRuntimeException: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[], versionCode=10, versionName=1.0.7}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.

@levonlevonian
Copy link

levonlevonian commented Mar 17, 2020

Hi StevenEsqTwo,

If you have an absolute path specified in your Gradle script for the output file, then please note that absolute paths are not supported when setting an output file name. Also, instead of output.outputFile, you'll need to use output.outputFileName. Please check those 2 things in your Gradle script, and hopefully it builds fine. Thanks!

applicationVariants.all { variant ->
    variant.outputs.all {
        outputFileName = "${variant.name}-${variant.versionName}.apk"
    }
}

@StevenEsqTwo
Copy link
Author

Hi levonlevonian:

Thank you very much for your very helpful feedback. I am getting one last error which I hope you have seen before! Any clues? Thank you so much for looking.

A problem occurred evaluating script.

Could not get unknown property 'applicationVariants' for project ':app' of type org.gradle.api.Project.

Here is my existing script with your recommendations:

def all = applicationVariants.all { variant ->
;
def appName
// Use applicationName if available, else use parent name
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
appName = parent.name
}

variant.outputs.all { 
    
    def newApkName
    if (output.zipAlign) {
        newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
    } else {
        newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
    }
    output.outputFileName = "${variant.name}-${variant.versionName}.apk"
}

}

@levonlevonian
Copy link

Hi StevenEsqTwo,

To be able to use applicationVariants.all you need to ensure you have apply plugin: 'com.android.application' and not apply plugin: 'com.android.library'. Also, feel free to search for a solution to any build errors on StackOverflow, since those are generic Android build errors, rather than Fire App Builder specific. Thanks!

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

2 participants