crazecoder / flutter_bugly

腾讯Bugly flutter应用更新统计及异常上报插件,支持Android、iOS
Other
595 stars 163 forks source link

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

Open bianxiang opened 4 years ago

bianxiang commented 4 years ago

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

FAILURE: Build failed with an exception.

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

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

类似这样

zhangyc commented 4 years ago

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

是的