Flutter-geolocator: FAILURE: ์˜ˆ์™ธ์™€ ํ•จ๊ป˜ ๋นŒ๋“œ์— ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2020๋…„ 12์›” 09์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: Baseflow/flutter-geolocator

๐Ÿ› ๋ฒ„๊ทธ ์‹ ๊ณ 

Flutter๋ฅผ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ, Geolocator๋ฅผ ^6.1.13 ๋ฒ„์ „์œผ๋กœ ๋™์‹œ์— ์—…๋ฐ์ดํŠธํ•œ ํ›„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด Android์šฉ ๋นŒ๋“œ๋ฅผ ์ค‘๋‹จํ–ˆ์Šต๋‹ˆ๋‹ค. IOS์—๋Š” ๋ฌธ์ œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

๋””๋ฒ„๊ทธ ์ฝ˜์†”

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':geolocator:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':geolocator:debugCompileClasspath'.
   > Could not resolve androidx.lifecycle:lifecycle-common:{strictly 2.0.0}.
     Required by:
         project :geolocator
      > Cannot find a version of 'androidx.lifecycle:lifecycle-common' that satisfies the version constraints: 
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
           Constraint path 'com.baseflow.geolocator:geolocator:1.0' --> 'androidx.lifecycle:lifecycle-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.lifecycle:lifecycle-common-java8:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'

   > Could not resolve androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}.
     Required by:
         project :geolocator
      > Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints: 
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0'
           Constraint path 'com.baseflow.geolocator:geolocator:1.0' --> 'androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-runtime:2.1.0'
           Dependency path 'com.baseflow.geolocator:geolocator:1.0' --> 'io.flutter:flutter_embedding_debug:1.0.0-df39e5c51517a73e61647286ab21252074512c63' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'

...

ํ”Œ๋Ÿฌํ„ฐ ๋‹ฅํ„ฐ -v

[โœ“] Flutter (Channel master, 1.25.0-5.0.pre.125, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-CY)
    โ€ข Flutter version 1.25.0-5.0.pre.125 at /Users/Sammius/Flutter/flutter
    โ€ข Framework revision a12e2a473a (3 hours ago), 2020-12-08 23:13:04 -0500
    โ€ข Engine revision df39e5c515
    โ€ข Dart version 2.12.0 (build 2.12.0-133.0.dev)

[โœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    โ€ข Android SDK at /Users/Sammius/android
    โ€ข Platform android-29, build-tools 28.0.3
    โ€ข ANDROID_HOME = /Users/Sammius/android
    โ€ข ANDROID_SDK_ROOT = /Users/Sammius/android
    โ€ข Java binary at: /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java
    โ€ข Java version Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
    โ€ข All Android licenses accepted.

[โœ“] Xcode - develop for iOS and macOS (Xcode 12.2)
    โ€ข Xcode at /Applications/Xcode.app/Contents/Developer
    โ€ข Xcode 12.2, Build version 12B45b
    โ€ข CocoaPods version 1.10.0.rc.1

[โœ“] Chrome - develop for the web
    โ€ข Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    โ€ข Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[โœ“] IntelliJ IDEA Community Edition (version 2019.2.3)
    โ€ข IntelliJ at /Applications/IntelliJ IDEA CE.app
    โ€ข Flutter plugin version 39.0.5
    โ€ข Dart plugin version 192.7402

[โœ“] VS Code (version 1.51.1)
    โ€ข VS Code at /Applications/Visual Studio Code.app/Contents
    โ€ข Flutter extension version 3.17.0

[โœ“] Connected device (2 available)
    โ€ข Android SDK built for x86 64 (mobile) โ€ข emulator-5554 โ€ข android-x64    โ€ข Android 9 (API 28) (emulator)
    โ€ข Chrome (web)                          โ€ข chrome        โ€ข web-javascript โ€ข Google Chrome 87.0.4280.88

! Doctor found issues in 1 category.

ํ”Œ๋žซํผ:

  • [ ] : ์•„์ดํฐ: iOS
  • [x] :๋กœ๋ด‡: ์•ˆ๋“œ๋กœ์ด๋“œ
android up for graps

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

[โœ“] Flutter (Channel beta, 1.25.0-8.1.pre, on macOS 11.0.1 20B29 darwin-x64, locale en-AU)
[โœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[โœ“] Xcode - develop for iOS and macOS (Xcode 12.3)
[โœ“] Chrome - develop for the web
[โœ“] Android Studio (version 3.5)
[โœ“] VS Code (version 1.52.0)
[โœ“] Connected device (2 available)

์ด์ œ ์ตœ์‹  Flutter ๋ฒ ํƒ€ ์ฑ„๋„์— ๋Œ€ํ•œ ๋นŒ๋“œ ์‹คํŒจ

๋ชจ๋“  4 ๋Œ“๊ธ€

@Sammius ์ด ๋ฌธ์ œ๋ฅผ ๋ณด๊ณ ํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. io.flutter:flutter_embedding_debug ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜์–ด ์ด์ œ androidx.lifecycle:lifecycle-runtime ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฒ„์ „ 2.2.0์ด ํ•„์š”ํ•˜์ง€๋งŒ ์ง€๋ฆฌ ์œ„์น˜ ์ถ”์ ๊ธฐ๋Š” ๋ฒ„์ „ 2.0.0๋งŒ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ง€๊ธˆ์€ Flutter ๋ฒ ํƒ€ ๋˜๋Š” ์•ˆ์ •์ ์ธ ์ฑ„๋„์„ ์‚ฌ์šฉํ•˜์—ฌ ์•ฑ์„ ๋นŒ๋“œํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ Flutter ์—…๋ฐ์ดํŠธ ํ›„ ๋ฌธ์ œ๊ฐ€ ์‚ฌ๋ผ์กŒ์Šต๋‹ˆ๋‹ค.

[โœ“] Flutter (Channel beta, 1.25.0-8.1.pre, on macOS 11.0.1 20B29 darwin-x64, locale en-AU)
[โœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[โœ“] Xcode - develop for iOS and macOS (Xcode 12.3)
[โœ“] Chrome - develop for the web
[โœ“] Android Studio (version 3.5)
[โœ“] VS Code (version 1.52.0)
[โœ“] Connected device (2 available)

์ด์ œ ์ตœ์‹  Flutter ๋ฒ ํƒ€ ์ฑ„๋„์— ๋Œ€ํ•œ ๋นŒ๋“œ ์‹คํŒจ

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

  1. ./android/build.gradle classpath 'com.android.tools.build:gradle:4.1.0' ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
  2. ./android/gradle/wrapper/gradle-wrapper.properties ์˜ distributionUrl #$์„ distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip ๋ณ€๊ฒฝ
์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰