android - 无法解析 : 'com.android.support:appcompat-v7:16.+'

标签 android

我在使用 Android Studio 时遇到了一些小问题:

Failed to resolve: 'com.android.support:appcompat-v7:16.+'

error

我也尝试安装存储库但出现另一个错误。

Error2

apply plugin: 'com.android.application'

android {
    compileSdkVersion 16
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "p11zt.futebol24"
        minSdkVersion 16
        targetSdkVersion 16
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    } }

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:16.+' }

最佳答案

将编译 sdk 更改为 23 试试这个

 compileSdkVersion 23
 targetSdkVersion 23

并使用 support:appcompat

 compile 'com.android.support:appcompat-v7:23.0.0'

关于android - 无法解析 : 'com.android.support:appcompat-v7:16.+' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34372656/

相关文章:

android - fragment 没有被替换,而是放在前一个 fragment 之上

android - 在自定义内容提供程序中调用删除方法

android - 如何从 Kotlin 中的外部 Activity 或 fragment 类访问 viewModel 中的对象?

android - 如何管理状态栏颜色?

android - 在 Android 中收到的第二个最近的彩信而不是最近的彩信

android - 有哪些工具可以为 android 提供 apk 保护(防止逆向和重新打包)?

android - 启动通用 Activity 并等待 AsyncTask 完成

Android:如何命名布局文件夹

android - Image_picker throws removeInvalidNode jank list 中的所有节点都超时而不是返回图像

java - android 从网络读取文本文件