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

example build error #8

Closed
LinXiaoTao opened this issue Feb 27, 2019 · 5 comments
Closed

example build error #8

LinXiaoTao opened this issue Feb 27, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@LinXiaoTao
Copy link
Contributor

 Android dependency 'androidx.legacy:legacy-support-core-ui' has different version for the compile (1.0.0-beta01) and runtime (1.0.0) classpath. You should manually set the same version via DependencyResolution

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✗] iOS toolchain - develop for iOS devices
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install with Brew:
        brew install ios-deploy
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To install:
        brew install cocoapods
        pod setup
[✓] Android Studio (version 3.3)
[!] IntelliJ IDEA Community Edition (version 2018.3.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.31.1)
[✓] Connected device (1 available)

! Doctor found issues in 3 categories.

@jhomlala
Copy link
Owner

jhomlala commented Mar 2, 2019

Hi, can you provide more details? How did you encounter this error from androidx? Please add steps to reproduce. Thanks !

@jhomlala jhomlala self-assigned this Mar 2, 2019
@jhomlala jhomlala added the bug Something isn't working label Mar 2, 2019
@LinXiaoTao
Copy link
Contributor Author

If I don't manually resolve the dependency conflict, I won't be able to compile

//  app module build.gradle
dependencies {

    configurations.all {
        resolutionStrategy.force 'androidx.vectordrawable:vectordrawable:1.0.1'
        resolutionStrategy.force 'androidx.documentfile:documentfile:1.0.0'
        resolutionStrategy.force 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
        resolutionStrategy.force 'androidx.fragment:fragment-animated:1.1.0-alpha04'
        resolutionStrategy.force 'androidx.appcompat:appcompat:1.1.0-alpha02'

    }
}

@jhomlala
Copy link
Owner

jhomlala commented Mar 2, 2019

Instead of adding dependencies to build.gradle, go to this build.gradle: https://github.com/jhomlala/catcher/blob/master/android/build.gradle
and change rootProject.allProjects configuration to:

    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'androidx.core') {
                details.useVersion "1.0.1"
            }
            if (details.requested.group == 'androidx.lifecycle') {
                details.useVersion "2.0.0"
            }
            if (details.requested.group == 'androidx.versionedparcelable') {
                details.useVersion "1.0.0"
            }
            if (details.requested.group == 'androidx.legacy') {
                details.useVersion "1.0.0"
            }
        }
    }
}

Remember to remove previous dependencies.

@LinXiaoTao
Copy link
Contributor Author

ok. can be update example project ?

@jhomlala
Copy link
Owner

jhomlala commented Mar 2, 2019

Sure 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants