Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter run fails on android #13

Closed
ryanhz opened this issue Nov 14, 2018 · 5 comments
Closed

Flutter run fails on android #13

ryanhz opened this issue Nov 14, 2018 · 5 comments

Comments

@ryanhz
Copy link
Contributor

ryanhz commented Nov 14, 2018

No description provided.

@ryanhz
Copy link
Contributor Author

ryanhz commented Nov 14, 2018

Android dependency 'com.android.support:support-core-ui' has different version for the compile (27.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution

@ryanhz ryanhz changed the title Android dependency 'com.android.support:support-core-ui' has different version for the compile (27.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution Flutter run fails on android Nov 14, 2018
@pichillilorenzo
Copy link
Owner

Are you sure that this is coming from my package and not from your app or other package?? Because I don't have any dependency with name com.android.support:support-core-ui.

As you can see in the build.gradle file, these are my dependencies:

dependencies {
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.squareup.okhttp3:mockwebserver:3.11.0'
}

@ryanhz
Copy link
Contributor Author

ryanhz commented Nov 15, 2018

Don't know. Try to create a new app with dependencies:

dependencies:
flutter:
sdk: flutter
firebase_messaging: ^2.1.0
flutter_inappbrowser: ^0.5.51

and then:

FAILURE: Build failed with an exception.

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

Android dependency 'com.android.support:support-core-utils' has different version for the compile (26.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution

flutter doctor -v
[✓] Flutter (Channel master, v0.11.5-pre.37, on Mac OS X 10.13.6 17G3025, locale en-NZ)
• Flutter version 0.11.5-pre.37 at /Users/Ryan/Applications/flutter
• Framework revision 1561815e6c (2 days ago), 2018-11-13 16:02:34 -0800
• Engine revision 6a132f80f4
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /usr/local/share/android-sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /usr/local/share/android-sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.2
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 29.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.28.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.20.0

[✓] Connected device (1 available)
• VTR AL00 • SJE5T17427005824 • android-arm64 • Android 8.0.0 (API 26)

• No issues found!

@chunkeat96
Copy link

Try add this in your build.gradle file.

subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "27.1.1" } } } }

capture

@ryanhz
Copy link
Contributor Author

ryanhz commented Dec 11, 2018

Yes, I solved this issue in a similar way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants