0

我检查了所有解决方案,得到了需要更新 Android -Studio 版本的答案。

  1. 安卓工作室:3.2
  2. 摇篮版本:5.1.1
  3. 安卓插件版本:3.4.2

当我尝试集成 Youtube API 时出现了这个问题。

摇篮(项目):

    classpath 'com.android.tools.build:gradle:3.4.2'

尝试更新 AS 版本,但仍然显示 AS 3.2

    android {
compileSdkVersion 28
defaultConfig {
    applicationId "mateiladesign.practice.com.materialdesign"
    minSdkVersion 21
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

    dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0 alpha-03' //2.2.0-alpha03  2.0.0-alpha01
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
//AndroidX
implementation 'com.google.android.material:material:1.1.0 alpha09' //1.0.0-alpha03
//Recycler
implementation 'com.android.support:recyclerview-v7:28.0.0'
//Hodenhof Circle ImageView
implementation 'de.hdodenhof:circleimageview:3.0.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
//YTAPI
implementation files('libs/YouTubeAndroidPlayerApi.jar')

}

我该怎么做才能解决这个问题?

    Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()Lorg/gradle/api/artifacts/ModuleIdentifier;
4

0 回答 0