0

我导出了我的 Build box 项目并在 Android Studio 上打开了它。但无法构建它。我收到此错误。

无法解决:appcompat-v7

摇篮文件

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.test.test1"
        minSdkVersion 16
        targetSdkVersion 26
        multiDexEnabled true

        ndk {
            moduleName "player_shared"
        }
    }

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

    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {
    implementation 'com.google.android.gms:play-services:+'
    implementation 'com.android.support:multidex:1.0.3'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    // More deps here //
}

有人知道怎么修这个东西吗 ?

4

1 回答 1

1

在依赖项中添加:

implementation 'com.android.support:appcompat-v7:27.1.1'

在项目gradle中添加这个

allprojects {
  repositories {
  jcenter()
  maven { url "https://jitpack.io" }
  google()
  }
}
于 2018-10-25T20:16:52.273 回答