Coder Social home page Coder Social logo

Apk Variant Output about fire-app-builder HOT 8 CLOSED

amzn avatar amzn commented on July 29, 2024
Apk Variant Output

from fire-app-builder.

Comments (8)

robdaven avatar robdaven commented on July 29, 2024 1

This problem still exists in 1.0.7

from fire-app-builder.

robdaven avatar robdaven commented on July 29, 2024

In Android Studio open "artifacts.gradle".

Change this:
gradle41update

To this:
gradle41update2

Then resync Gradle. It will give you sync errors:
gradle41update3

Click "Update Build Tools version and sync project" for each of the errors. It will take a few times to clear the list.

from fire-app-builder.

brian-ross avatar brian-ross commented on July 29, 2024

This issue to due to using a newer version of gradle with Android Studio 3 and above. Changing the artifacts.gradle file as indicated in #14 is correct. However, you also may have to update your gradle version of the project. If you don't want to do this, use an older version of Android Studio; earlier than Version 3.

from fire-app-builder.

iknowzo avatar iknowzo commented on July 29, 2024

I did this and now I'm getting this error: Gradle DSL method not found: 'deleteAllActions()'

Not sure how to fix this, I'm not getting the option to update build tools version

from fire-app-builder.

levonlevonian avatar levonlevonian commented on July 29, 2024

Hi iknowzo,

Please see the following forum thread where I answered a similar question (see the first comment under the original question):
https://forums.developer.amazon.com/questions/93948/cannot-set-the-value-of-read-only-property-outputf.html?childToView=205687#comment-205687

from fire-app-builder.

HelaGone avatar HelaGone commented on July 29, 2024

Hi @levonlevonian
I'm facing some issues here related to this thread.

I'm working on Android Studio 3.4.2 with the Fire App Builder to develop our Fire Tv application.
Out of the box the Fire App Builder can't build an APK even before I touch any code.
The issue was the "Unsupported version of Gradle". So, I upgraded the Gradle version to 3.4.2. After hit click on Sync project button, another error poped up that states that the "Minimum supported Gradle version is 5.1.1" So I went to graddle-wrapper.properties file and upgraded the Gradle version to 5.1.1-all.zip. Then I hit the Sync project button and the console says that "Cannot set the valur of read-only property 'outputFile' for APKVAriantOutput…" So, after some googling I stumble upon this thread and followed the @robdaven instructions. After hitting the sync button again the error says that the "Gradle DSL method not found 'deleteAllActions()'", So I tracked the issue down to the Amazon's forum that you point. I've added the google() repo but the same error stands.

I've tried to Clean & Rebuild the project, but I only get a lot of warnings complaining about a bunch of deprecated methods. I guess that happens when you try to work with outdated forks of Android on an Updated Android Studio Environment

I've even tried to match the versions you used in your responses but It still complains about mismatched Gradle versions.

Obviously I'm not going to downgrade Android Studio just for this development. Is there a workaround for this or I would need to use an old version of Android to be able to develop an app for Fire Tv?

from fire-app-builder.

levonlevonian avatar levonlevonian commented on July 29, 2024

Hi @HelaGone

For Gradle, are you using a wrapper or a local distribution? You can check that in Preferences, under "Build, Execution, Deployment", and then "Gradle".

If you are using the wrapper, then normally Android Studio offers to update the wrapper for you if you click on the error telling you that it is not a supported version. Otherwise, go to /gradle/wrapper/gradle-wrapper.properties file, which contains a line that will look something like this: distributionUrl=https://services.gradle.org/distributions/gradle-X.Y.Z-all.zip -- here change the version at the end to a supported version.

If you are using the local distribution, then again you will need to update your local Gradle to a supported version, or ideally switch to using the wrapper, which is a recommended way.

It's not clear what you mean by "or I would need to use an old version of Android to be able to develop an app for Fire Tv?" What device and OS version are you testing your app on? Normally, you would connect to your Fire TV and build, run and test your app directly on it. Thanks!

from fire-app-builder.

HelaGone avatar HelaGone commented on July 29, 2024

Hi @levonlevonian
I'm testing the application on a Fire Stick Gen 2. The application runs perfectly when I side load it to the Fire Stick.

For Gradle I'm using the one that comes with the Fire App Builder, which is the wrapper.
Indeed, for testing purposes, I've downloaded the Fire App Builder, build the project as is and tried to generate the APK but I got the same issue. It can't compile the APK due to the errors in Gradle's compatibility.

After try your suggestions I stumble on this error:
Gradle DSL method not found: 'deleteAllActions()'

Which is the same isse described by @iknowzo. I've followed the link you provide, and did the changes accordingly, but the error persists.

This is the output:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':ContentBrowser'.

Caused by: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method deleteAllActions() for arguments [] on task ':ContentBrowser:extractDebugAnnotations' of type com.android.build.gradle.tasks.ExtractAnnotations.

Here's my setup:
at gradle-wrapper.properties:
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip

at build.gradle (Project: Application):

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        if (rootProject.hasProperty('mavenUrl')) {
            maven { url rootProject.mavenUrl }
        }
    }
}

at artifacts.gradle:

android.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 { output ->
        def newApkName
        if (output.zipAlign) {
            newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
        } else {
            newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
        }
        outputFileName = new File(output.outputFileName, newApkName)
    }
}

at build.gradle (Module: app)

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
// Uncomment when using CrashlyticsComponent
//apply plugin: 'io.fabric'
apply from: "../artifacts.gradle"

repositories {
    // Uncomment when using CrashlyticsComponent
    //maven { url 'https://maven.fabric.io/public' }
}

buildscript {
    repositories {
        jcenter()
        // Uncomment when using CrashlyticsComponent
        //maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'me.tatarka:gradle-retrolambda:3.2.3'
        // Uncomment when using CrashlyticsComponent
        //classpath 'io.fabric.tools:gradle:1.+'
    }
}

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.0"

    defaultConfig {
        applicationId "com.fireappbuilder.android.noticieros"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 10
        versionName "1.0.7"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            testCoverageEnabled = true
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    // this is for jackson
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
        exclude 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
        exclude 'META-INF/rxjava.properties'
    }

    lintOptions {
        abortOnError false
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile 'junit:junit:4.12'
    androidTestCompile 'org.mockito:mockito-core:1.9.5'
    androidTestCompile ('com.android.support.test:rules:0.5') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestCompile ('com.android.support.test:runner:0.5') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'

    androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.3.1'

    compile project(':TVUIComponent')
    compile project(':UAMP')
    compile project(':AMZNMediaPlayerComponent')
    compile project(':PassThroughAdsComponent')
    compile project(':PassThroughLoginComponent')
    compile project(':GoogleAnalyticsComponent')
}

Let me know if this make sense or am I missing something?
Thanks in advance

from fire-app-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.