【发布时间】:2022-01-17 16:49:27
【问题描述】:
无法确定任务 ':app:processDebugResources' 的依赖关系。
无法解析配置“:app:debugRuntimeClasspath”的所有任务依赖项。 无法解析 com.facebook.android:facebook-login:[5,6)。
要求: 项目:应用程序 > 无法列出 com.facebook.android:facebook-login 的版本。 > 无法从 https://google.bintray.com/exoplayer/com/facebook/android/facebook-login/maven-metadata.xml 加载 Maven 元数据。 > 无法获取资源“https://google.bintray.com/exoplayer/com/facebook/android/facebook-login/maven-metadata.xml”。 > 无法获取“https://google.bintray.com/exoplayer/com/facebook/android/facebook-login/maven-metadata.xml”。从服务器收到状态码 502:Bad Gateway
- 尝试: 使用 --stack trace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
应用级/buildgradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
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.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID
(https://developer.android.com/studio/build/application-id.html).
applicationId "com.deligence.hookup4u2"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Use code below for production build
// For debug mode you need to comment above lines of code
// Issue with 'libflutter.so'
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86'
}
}
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 {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.facebook.android:facebook-login:[5,6)'
implementation 'com.google.firebase:firebase-messaging:20.1.6'
}
项目级别/buildGradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
标签: flutter flutter-layout flutter-dependencies flutter-web flutter-animation