flutter_bugly icon indicating copy to clipboard operation
flutter_bugly copied to clipboard

集成后报错了,请问怎么解决?

Open bianxiang opened this issue 5 years ago • 2 comments

Initializing gradle... 0.8sarget-platform android-arm Resolving dependencies... 1.9s

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:preReleaseBuild'.

Android dependency 'androidx.fragment:fragment' has different version for the compile (1.1.0-alpha06) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 42s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 42.7s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Gradle task assembleRelease failed with exit code 1

bianxiang avatar Jan 07 '20 08:01 bianxiang

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'androidx.fragment'
                    && !details.requested.name.contains('fragment') ) {
                details.useVersion "1.1.0"
            }
        }
    }
}

类似这样

crazecoder avatar Jan 08 '20 02:01 crazecoder

Initializing gradle... 0.8sarget-platform android-arm Resolving dependencies... 1.9s

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:preReleaseBuild'.

Android dependency 'androidx.fragment:fragment' has different version for the compile (1.1.0-alpha06) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org

BUILD FAILED in 42s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 42.7s

The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.

Gradle task assembleRelease failed with exit code 1

是的

zhangyc avatar Jan 09 '20 01:01 zhangyc