Open bianxiang opened 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"
}
}
}
}
类似这样
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
是的
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'.
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