相关疑难解决方法(0)

我可以使用Android支持androidx项目的库吗?

我知道,androidx和支持依赖导致multidex错误 我们不能同时使用androidx和android支持.所以我完全迁移到androidx.但我的一个依赖lib使用了android支持"lottie".

在上述情况下我们能做些什么?我应该从我的项目中删除'lottie'吗?

下面是我的傻瓜

defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }

    ext{
    lottieVersion = "2.5.4"
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    def androidx = "1.0.0-rc01"
    api "androidx.constraintlayout:constraintlayout:1.1.2"
    api "androidx.appcompat:appcompat:$androidx"
    api "androidx.recyclerview:recyclerview:$androidx"
    api "androidx.cardview:cardview:$androidx"
    api "androidx.core:core-ktx:$androidx"
    api "com.google.android.material:material:1.0.0-rc01"
    implementation "com.google.code.gson:gson:2.8.5"
    implementation "androidx.multidex:multidex:2.0.0"
    implementation "com.airbnb.android:lottie:$lottieVersion"
    }
Run Code Online (Sandbox Code Playgroud)

android android-jetpack

63
推荐指数
4
解决办法
4万
查看次数

无法解决:com.facebook.android:facebook-android-sdk:[4,5)

我在我的项目中使用facebook sdk.Facebook SDK直到昨天仍然有效.但今天当我打开我的项目时,构建失败并显示错误如下

 Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not resolve com.facebook.android:facebook-android-sdk:[4,5).
     Required by:
         project :app
      > Could not resolve com.facebook.android:facebook-android-sdk:[4,5).
         > Failed to list versions for com.facebook.android:facebook-android-sdk.
            > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
               > Could not GET 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
                  > jcenter.bintray.com
      > Could not resolve com.facebook.android:facebook-android-sdk:[4,5).
         > Failed to list versions for com.facebook.android:facebook-android-sdk.
            > Unable to load Maven meta-data from https://jitpack.io/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
               > Could not GET 'https://jitpack.io/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
                  > …
Run Code Online (Sandbox Code Playgroud)

android facebook android-gradle-plugin

10
推荐指数
6
解决办法
1万
查看次数