flutter runμ μ€νν λ μ€λ₯κ° λ°μν©λλ€.
flutter run
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 0.9s
Running 'gradlew assembleDebug'...
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
Configuration 'profileCompile' in project ':app' is deprecated. Use 'profileImplementation' instead.
Configuration 'releaseCompile' in project ':app' is deprecated. Use 'releaseImplementation' instead.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Configuration 'debugProvided' in project ':apn_fb_login' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':apn_fb_login' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':firebase_messaging' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':firebase_messaging' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':google_sign_in' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':google_sign_in' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':image_picker' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':image_picker' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':share' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':share' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':shared_preferences' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':shared_preferences' is deprecated. Use 'releaseCompileOnly' instead.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Gradle build failed: 1
λ΄ gradle.build νμΌμ λ€μκ³Ό κ°μ΅λλ€.
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { stream ->
localProperties.load(stream)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 26
buildToolsVersion '26.0.3'
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.shuttertop.app"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
νλ¬ν° λ₯ν°:
[β] Flutter (on Linux, locale en_US.UTF-8, channel alpha)
β’ Flutter at /home/luca/Programs/flutter
β’ Framework revision 8f65fec5f5 (4 weeks ago), 2017-12-12 09:50:14 -0800
β’ Engine revision edaecdc8b8
β’ Tools Dart version 1.25.0-dev.11.0
β’ Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e
[β] Android toolchain - develop for Android devices (Android SDK 26.0.3)
β’ Android SDK at /home/luca/Android/Sdk
β’ Android NDK at /home/luca/Android/Sdk/ndk-bundle
β’ Platform android-26, build-tools 26.0.3
β’ ANDROID_HOME = /home/luca/Android/Sdk
β’ Java binary at: /home/luca/Programs/android-studio/jre/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[β] Android Studio (version 3.0)
β’ Android Studio at /home/luca/Programs/android-studio
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[β] Connected devices
β’ Android SDK built for x86 β’ emulator-5554 β’ android-x86 β’ Android 8.0.0 (API 26) (emulator)
μΆκ°νμ¬ ν΄κ²°νμ΅λλ€.
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
android/build.gradle νμΌμ νμ νλ‘μ νΈ μΉμ μΌλ‘
λλ λκ°μ λ¬Έμ κ° μμ΅λλ€. μ 체 μ½λλ₯Ό κ²μν μ μμ΅λκΉ? μ¬λ°λ₯Έ build.gradle νμΌμ μ루μ μ μΆκ°νλ λ° μ΄λ €μμ΄ μμ΅λλ€.
κ³ λ§μ
μ΄ κ°λ€
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
μ΄κ²μ λλ₯Ό μν΄ μΌνμ΅λλ€.κ³ λ§μμ.
λλ κ·Έκ²μ΄ 무μμ νλμ§ μ΄ν΄νμ§ λͺ»νμ§λ§ κ·Έ κΈ°λ₯μ κ°λ¨ν μ€λͺ
ν΄ μ£Όμκ² μ΅λκΉ?
μ£μ‘ν©λλ€. μ μ΄λ° μΌμ΄ λ°μνλμ§ κΈ°μ΅ν μ μμ΅λλ€. μ΄ μ€λ₯λ μ΄μ λ²μ (μ: 2.0.1)μμ μ΅μ λ²μ (μ: 3.0.1)μΌλ‘ νλ‘μ νΈλ₯Ό λ§μ΄κ·Έλ μ΄μ ν λ λ°μνλ€κ³ μκ°ν©λλ€. μ μ ν μ’ μμ±μ λ€μ΄λ‘λνμ΅λλ€.
λ λ§μ μ 보λ₯Ό μ»μΌλ €λ©΄ μ΄κ²μ νμΈνμμμ€. https://stackoverflow.com/questions/47448502/could-not-resolve-com-android-supportappcompat-v726-1-0-in-android-studio-new
flutter map_view νλ¬κ·ΈμΈκ³Ό λμΌν λ¬Έμ κ° μΆκ°λμμ΅λλ€.
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
android/build.gradle μ λ λΆλΆμΌλ‘ μ΄λνμ¬ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
@lalukz κ°μ¬ν©λλ€
Android jetpack androidx ν¨ν€μ§λ‘ λ§μ΄κ·Έλ μ΄μ ν λμ λ²κ±°λ‘μμ μμν΄ λ³΄μΈμ.
μΌνλ€,
clodfirestoreμ firebase λ©μμ§ plginμ λͺ¨λ μ¬μ©νλ λμ μ€λ₯κ° λ°μνμ΅λλ€. μ΄μ μμ μ€μ μΆκ°νλ©΄ μ¬λΌμ§λλ€.
λν μ± μμ€ gradle νμΌμ λ€μ μ€μ μΆκ°ν©λλ€.
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
κ°μ μ€λ₯μ§λ§ λ°λ
> Android dependency 'com.android.support:support-v4' has different version for the compile (27.0.1) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
ν΄κ²°νκΈ° μν΄ μ΄κ²μ μΆκ°νμ΅λλ€.
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.0.1"
}
}
μ΄ μμ μ μννλ©΄ μ±μ΄ μ»΄νμΌλμ§λ§ λ‘κ·Έμ μ€λ₯ μμ΄ μ± μμ μ μΆ©λμ΄ λ°μν©λλ€.
λν 27.1.0 μμ μ μννμΌλ©° μ± μμ μ μΆ©λμ΄ λ°μνμ΅λλ€.
νλ¬Ό 컬ν μμ΄ ν΄κ²°ν μ μλ λ°©λ²μ΄ μμ΅λκΉ?
λλ μ΄κ²μ λ€λ₯Έ λ°©λ²μΌλ‘ ν΄κ²°ν μ μμλ€. μ¬μ ν μ΄λ €μμ κ²ͺκ³ μλ μΌλΆ μ¬λλ€μκ²λ ν¨κ³Όκ° μμ μ μμ΅λλ€ . @dannnnthemannnn
android/app/build.gradle
μ λ€μ μ€μ μΆκ°ν©λλ€.
implementation "com.android.support:support-v4:27.1.1"
μ΄μ λ€μκ³Ό κ°μ΄ 보μ λλ€.
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "com.android.support:support-v4:27.1.1" // added this
}
μλμ κ°μ΄ μΆκ°νλ©΄ μλν©λλ€.
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
μ루μ μ΄ μ μλν©λλ€.
flutter map_view νλ¬κ·ΈμΈκ³Ό λμΌν λ¬Έμ κ° μΆκ°λμμ΅λλ€.
subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.1.0" } } } }
android/build.gradle μ λ λΆλΆμΌλ‘ μ΄λνμ¬ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
@lalukz κ°μ¬ν©λλ€
κ°μ¬ν©λλ€.
λλ μ΄κ²μ λ€λ₯Έ λ°©λ²μΌλ‘ ν΄κ²°ν μ μμλ€. μ¬μ ν μ΄λ €μμ κ²ͺκ³ μλ μΌλΆ μ¬λλ€μκ²λ ν¨κ³Όκ° μμ μ μμ΅λλ€. @dannnnthemannnn
android/app/build.gradle
μ λ€μ μ€μ μΆκ°ν©λλ€.
implementation "com.android.support:support-v4:27.1.1"
μ΄μ λ€μκ³Ό κ°μ΄ 보μ λλ€.
dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation "com.android.support:support-v4:27.1.1" // added this }
μ΄ μ루μ λ§ λ΄ μν©μμ μλν©λλ€. android/build.gradleμ λ³κ²½νλ κ²μ΄ μλνμ§ μμ΅λλ€.
λλ λν κ°μ λ¬Έμ κ° μμκ³ μΆκ°νμ¬ ν΄κ²°νμ΅λλ€.
νμ νλ‘μ νΈ {
project.configurations.all {
resolutionStrategy.eachDependency { μΈλΆ μ 보 ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('λ©ν°λ±μ€') ) {
details.useλ²μ "26.1.0"
}
}
}
}
android/build.gradle νμΌμ λμμ
λλ λν κ°μ λ¬Έμ κ° μμκ³ μΆκ°νμ¬ ν΄κ²°νμ΅λλ€.
νμ νλ‘μ νΈ {
project.configurations.all {
resolutionStrategy.eachDependency { μΈλΆ μ 보 ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('λ©ν°λ±μ€') ) {
details.useλ²μ "26.1.0"
}
}
}
}android/build.gradle νμΌμ λμμ
μ΄ μ루μ μ λ΄ μν©μμ μλν©λλ€.
κ°μ₯ μ μ©ν λκΈ
μ΄ κ°λ€