【发布时间】:2020-04-08 11:49:58
【问题描述】:
当我尝试在 Android 模拟器上运行我的 Flutter 应用程序时出现此错误,我使用的是 MacBook 和 VSCode,该应用程序在 ios 模拟器上运行良好。
*** What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' is set to compileOnly/provided which is not supported**
**These are my build.gradle dependcies:**
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
在 gradle.properties 中,这就是我所拥有的一切:
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
在我的应用级别 build.gradle 中:
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.androidx.support.test:runner:1.1.0'
androidTestImplementation 'com.androidx.support.test.espresso:espresso-core:3.1.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
}
【问题讨论】:
-
能否提供异常的完整堆栈跟踪?
标签: android gradle flutter androidx