簡體   English   中英

無法確定任務的依賴關系

[英]Could not determine the dependencies of task

Error:Could not determine the dependencies of task :app:transformClassesWithInstantRunForDebug.

要在運行API 17的設備上使用“即時運行”,您必須在SDK中安裝平台17

我該如何解決這個錯誤?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"

    defaultConfig {
        applicationId "com.google.firebase.quickstart.fcm"
        minSdkVersion 9
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'LICENSE.txt'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:24.2.1'


    compile 'com.google.firebase:firebase-messaging:9.6.1'

    // Testing dependencies
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support:support-annotations:24.2.1'
}

apply plugin: 'com.google.gms.google-services'

我有同樣的問題。 我通過重新啟動IntelliJ IDEA,adb服務器並將我的智能手機重新連接到adb來解決它。

  1. 導航到Android Studio - >首選項(MacOS)/設置(Windows) - >外觀和行為 - >系統設置 - > Android SDK - > SDK平台。
  2. 勾選Android 4.2 (Jelly Bean)
  3. 按Apply。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM