找不到AndroidDK.modules 所以在运行我的程序的过程中,我的建档失败了。我的意思是它实际上在前一秒起作用,而不是在后一秒起作用。我的成绩没有改变 Could not find androidsdk.modules:shield:unspecified. Required by: project :app > com.facebook.android:facebook-login:5.15.2 project :app > com.facebook.android:facebook-core:5.15.2 project :app > com.facebook.android:facebook-common:5.15.2 Search in build.gradle files apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' android { compileSdkVersion 28 buildToolsVersion "29.0.2" defaultConfig { multiDexEnabled true applicationId "com.example.casualdatingapp" minSdkVersion 26 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } lintOptions { disable "ResourceType" } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } } dependencies { implementation 'com.google.firebase:firebase-functions:19.0.1' implementation "com.android.support:support-compat:28.0.0" implementation 'com.google.firebase:firebase-messaging:20.1.0' implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.3.0' implementation 'com.github.jakob-grabner:Circle-Progress-View:1.4' implementation 'com.github.smarteist:autoimageslider:1.3.2' implementation "com.android.support:support-v4:+" implementation 'com.nineoldandroids:library:2.4.0' implementation 'com.daimajia.slider:library:1.1.5@aar' implementation "com.yuyakaido.android:card-stack-view:2.3.4" implementation 'org.mongodb:stitch-android-sdk:4.1.0' implementation 'com.mindorks:placeholderview:0.7.1' implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'com.google.code.gson:gson:2.7' api 'com.theartofdev.edmodo:android-image-cropper:2.8.+' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.google.android.gms:play-services-location:17.0.0' implementation 'com.facebook.android:facebook-login:[5,6)' implementation 'com.soundcloud.android:android-crop:1.0.1@aar' implementation 'com.mikhaellopez:circularimageview:3.2.0' api 'com.google.android.material:material:1.2.0-alpha01' implementation 'com.edmodo:rangebar:1.0.0' implementation 'pub.devrel:easypermissions:3.0.0' // implementation 'com.squareup.picasso:picasso:2.3.2' implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.android.support:multidex:1.0.3' implementation 'com.google.firebase:firebase-analytics:17.2.0' implementation 'com.google.firebase:firebase-storage:19.1.0' implementation 'com.google.firebase:firebase-auth:19.2.0' implementation 'com.google.firebase:firebase-firestore:21.3.1' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" def nav_version = "2.1.0" // Java language implementation implementation "androidx.navigation:navigation-fragment:$nav_version" implementation "androidx.navigation:navigation-ui:$nav_version" // Kotlin implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" } repositories { mavenCentral() maven { url "https://jitpack.io" } } apply plugin: 'com.google.gms.google-services' apply plugin: 'kotlin-android-extensions'

找不到AndroidDK.modules 所以在运行我的程序的过程中,我的建档失败了。我的意思是它实际上在前一秒起作用,而不是在后一秒起作用。我的成绩没有改变 Could not find androidsdk.modules:shield:unspecified. Required by: project :app > com.facebook.android:facebook-login:5.15.2 project :app > com.facebook.android:facebook-core:5.15.2 project :app > com.facebook.android:facebook-common:5.15.2 Search in build.gradle files apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' android { compileSdkVersion 28 buildToolsVersion "29.0.2" defaultConfig { multiDexEnabled true applicationId "com.example.casualdatingapp" minSdkVersion 26 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } lintOptions { disable "ResourceType" } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } } dependencies { implementation 'com.google.firebase:firebase-functions:19.0.1' implementation "com.android.support:support-compat:28.0.0" implementation 'com.google.firebase:firebase-messaging:20.1.0' implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.3.0' implementation 'com.github.jakob-grabner:Circle-Progress-View:1.4' implementation 'com.github.smarteist:autoimageslider:1.3.2' implementation "com.android.support:support-v4:+" implementation 'com.nineoldandroids:library:2.4.0' implementation 'com.daimajia.slider:library:1.1.5@aar' implementation "com.yuyakaido.android:card-stack-view:2.3.4" implementation 'org.mongodb:stitch-android-sdk:4.1.0' implementation 'com.mindorks:placeholderview:0.7.1' implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'com.google.code.gson:gson:2.7' api 'com.theartofdev.edmodo:android-image-cropper:2.8.+' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.google.android.gms:play-services-location:17.0.0' implementation 'com.facebook.android:facebook-login:[5,6)' implementation 'com.soundcloud.android:android-crop:1.0.1@aar' implementation 'com.mikhaellopez:circularimageview:3.2.0' api 'com.google.android.material:material:1.2.0-alpha01' implementation 'com.edmodo:rangebar:1.0.0' implementation 'pub.devrel:easypermissions:3.0.0' // implementation 'com.squareup.picasso:picasso:2.3.2' implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.android.support:multidex:1.0.3' implementation 'com.google.firebase:firebase-analytics:17.2.0' implementation 'com.google.firebase:firebase-storage:19.1.0' implementation 'com.google.firebase:firebase-auth:19.2.0' implementation 'com.google.firebase:firebase-firestore:21.3.1' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" def nav_version = "2.1.0" // Java language implementation implementation "androidx.navigation:navigation-fragment:$nav_version" implementation "androidx.navigation:navigation-ui:$nav_version" // Kotlin implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" } repositories { mavenCentral() maven { url "https://jitpack.io" } } apply plugin: 'com.google.gms.google-services' apply plugin: 'kotlin-android-extensions',java,android,android-studio,gradle,kotlin,Java,Android,Android Studio,Gradle,Kotlin,这是我的毕业证书 Could not find androidsdk.modules:shield:unspecified. Required by: project :app > com.facebook.android:facebook-login:5.15.2 project :app > com.facebook.android:facebook-core:5.15.2 project :app > com.facebook.android:fa

这是我的毕业证书

Could not find androidsdk.modules:shield:unspecified.
Required by:
    project :app > com.facebook.android:facebook-login:5.15.2
    project :app > com.facebook.android:facebook-core:5.15.2
    project :app > com.facebook.android:facebook-common:5.15.2
Search in build.gradle files
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 28
    buildToolsVersion "29.0.2"
    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.casualdatingapp"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable "ResourceType"
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
}

dependencies {


    implementation 'com.google.firebase:firebase-functions:19.0.1'
    implementation "com.android.support:support-compat:28.0.0"
    implementation 'com.google.firebase:firebase-messaging:20.1.0'
    implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.3.0'
    implementation 'com.github.jakob-grabner:Circle-Progress-View:1.4'
    implementation 'com.github.smarteist:autoimageslider:1.3.2'

    implementation "com.android.support:support-v4:+"
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.daimajia.slider:library:1.1.5@aar'
    implementation "com.yuyakaido.android:card-stack-view:2.3.4"
    implementation 'org.mongodb:stitch-android-sdk:4.1.0'
    implementation 'com.mindorks:placeholderview:0.7.1'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.google.code.gson:gson:2.7'
    api 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.facebook.android:facebook-login:[5,6)'
    implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    api 'com.google.android.material:material:1.2.0-alpha01'
    implementation 'com.edmodo:rangebar:1.0.0'
    implementation 'pub.devrel:easypermissions:3.0.0'
//    implementation 'com.squareup.picasso:picasso:2.3.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.firebase:firebase-firestore:21.3.1'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    def nav_version = "2.1.0"

    // Java language implementation
    implementation "androidx.navigation:navigation-fragment:$nav_version"
    implementation "androidx.navigation:navigation-ui:$nav_version"

    // Kotlin
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

}
repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android-extensions'


我不知道这是怎么发生的,也不知道为什么。恢复到以前有效的git回购并没有改变任何事情。。。可能是什么问题?

当我尝试在Unity中构建项目时,我也遇到了同样的错误

对于Unity,将实现替换为:

implementation 'com.facebook.android:facebook-applinks:[5,5.11.1)' 
implementation 'com.facebook.android:facebook-core:[5,5.11.1)' 
implementation 'com.facebook.android:facebook-login:[5,5.11.1)' 
implementation 'com.facebook.android:facebook-share:[5,5.11.1)'

在Gradle模板中。

我应该提到此解决方案适用于React Native。Rob的解决方案最适合原生Android


我刚才也遇到了同样的问题,以下是对我有效的方法。将
facebookSdkVersion=“5.15.3”
添加到

android
|--build.gradle
参考资料:


    • 我今天遇到了同样的问题。我使用的是“flatter\u facebook\u登录:^2.0.0”


      我将其升级为
      flatter\u facebook\u登录:^3.0.0
      。我不得不将
      logInWithReadPermission
      更改为
      logIn
      ,它为我解决了这个问题。

      这为我解决了这个问题。今天才开始

      implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
      
      我使用了这个版本[5,6] 编译'com.facebook.android:facebook安卓sdk:[5,6)'

      但我决定在下面的版本 编译'com.facebook.android:facebook android sdk:[4,5]


      祝您愉快

      我们可以将facebook SDK的3个功能配置为react原生Android应用程序:

    • package.json
      中的版本库
    • 依赖于android/app/build.gradle
    • android/build.gradle上的Facebook sdk版本
    • 此错误可能是一个bug:

      对于我来说,使用此配置:

    • “react native fbsdk”:“1.1.2”,在package.json中
    • implementation'com.facebook.android:facebook-android sdk:[5,5.11.1)
      on-android/app/build.gradle
    • android/build.gradle中的facebookSdkVersion='5.15.3'

    • 就我而言,我只是用

      implementation'com.facebook.android:facebook android sdk:5.15.3'


      它成功了。

      看起来很多人都遇到了这个问题,解决方法是覆盖react native fssdk android的build.gradle中的FaceBookSDK版本

      如果在项目根目录下的终端上运行此命令

      cat node_modules/react-native-fbsdk/android/build.gradle
      
      您应该看到,这个构建梯度将检查是否有从ext定义的名为facebookSdkVersion的变量,如果有,它将为facebook.android库版本获取此变量

      def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '[5.0,6.0[')
      
      dependencies {
          //noinspection GradleDynamicVersion
          implementation "com.facebook.react:react-native:+"  // From node_modules
          implementation "com.facebook.android:facebook-core:${FACEBOOK_SDK_VERSION}"
          implementation "com.facebook.android:facebook-login:${FACEBOOK_SDK_VERSION}"
          implementation "com.facebook.android:facebook-share:${FACEBOOK_SDK_VERSION}"
      }
      
      根据github票证和,版本5.15.1或5.15.3将解决此问题。因此,要覆盖facebookSdkVersion,您将在项目的android build.gradle中定义此版本,如下所示

      buildscript {
          ext {
              buildToolsVersion = "28.0.3"
              minSdkVersion = 18
              compileSdkVersion = 28
              targetSdkVersion = 28
              ...
      
              // the override version
              facebookSdkVersion = "5.15.3"
          }
      }
      
      在您的android/app/build.gradle依赖项中,也可以使用此版本

      implementation "com.facebook.android:facebook-android-sdk:$facebookSdkVersion"
      

      从Unity生成完全相同的问题。只发生在今天。可能远程回购被移动了?非常奇怪的事情。@Zwander你知道这是否是Facebook API问题吗?同样的问题,我正要自己打开它。我正在使用react native,我试着更新到最新版本,目前为止运气不好,我要离开几个小时…@Andre是的,完全相同的版本,5.15.2对我有效。今天打开我的项目时发生了错误。这对我无效,尽管Rob建议的解决方案有效。