Can't build my app with release flag


#1

Hello, I use webpack for the build of my app (with angular), the command: npm run build-android-bundle - uglify works very well, but when I use the flag --release ( npm run build-android-bundle – --release --keyStorePath ~/path/to/keystore --keyStorePassword your-pass --keyStoreAlias your-alias --keyStoreAliasPassword your-alias-pass) an error occurs here is its content:

Running full build
~/platforms/android/src/F0/AndroidManifest.xml:27:9-31 Error:
Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:25:5-27:34 to override.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processF0F1F2F3ReleaseManifest’.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:25:5-27:34 to override.

Command ./gradlew failed with exit code 1
i want help please?


#2

So it looks like you have a couple plugins that use different version of the support lib so you can try the following to lock the support version it will lock it to the latest u can choose which version you want the app to use also you will need to put this in the the app.gradle located in /SomeApp/app/App_Resources/Android/app.gradle

repositories {
maven {
            url 'https://maven.google.com'
        }
}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion '27.0.2'
        }
     }

   }
}

#3

it works. thank you very much. :pray::+1: triniwiz