Android_Studio Failed to resolve: com.android.support:appcompat-v7:29.错误解决

在安卓程序开发上面,按照教程设置了ActivityName等信息后点击编译出现Failed to resolve: com.android.support:appcompat-v7:29.错误,一看这个问题没有头绪,网上搜索看到一篇文章《Failed to resolve:com.android.support:appcompat-v7:报错处理

感觉找到了问题所在,主要是系统SDK版本,系统版本设置太高,但是编译器版本较低。按照设置后

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26   //29改为26
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.example.helloworld"
        minSdkVersion 15
        targetSdkVersion 26 //29改为26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.+'  //29改为26
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

编译通过

  • 5
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
v7-26.0.1-alpha1AppCompat_Body1 style TextAppearance_AppCompat_Body2 style TextAppearance_AppCompat_Button style TextAppearance_AppCompat_Caption style TextAppearance_AppCompat_Display1 style TextAppearance_AppCompat_Display2 style TextAppearance_AppCompat_Display3 style TextAppearance_AppCompat_Display4 style TextAppearance_AppCompat_Headline style TextAppearance_AppCompat_Inverse style TextAppearance_AppCompat_Large style TextAppearance_AppCompat_Large_Inverse style TextAppearance_AppCompat_Light_SearchResult_Subtitle style TextAppearance_AppCompat_Light_SearchResult_Title style TextAppearance_AppCompat_Light_Widget_PopupMenu_Large style TextAppearance_AppCompat_Light_Widget_PopupMenu_Small style TextAppearance_AppCompat_Medium style TextAppearance_AppCompat_Medium_Inverse style TextAppearance_AppCompat_Menu style TextAppearance_AppCompat_Notification style TextAppearance_AppCompat_Notification_Info style TextAppearance_AppCompat_Notification_Line2 style TextAppearance_AppCompat_Notification_Media style TextAppearance_AppCompat_Notification_Time style TextAppearance_AppCompat_Notification_Title style TextAppearance_AppCompat_SearchResult_Subtitle style TextAppearance_AppCompat_SearchResult_Title style TextAppearance_AppCompat_Small style TextAppearance_AppCompat_Small_Inverse style TextAppearance_AppCompat_Subhead style TextAppearance_AppCompat_Subhead_Inverse style TextAppearance_AppCompat_Title style TextAppearance_AppCompat_Title_Inverse style TextAppearance_AppCompat_Widget_ActionBar_Menu style TextAppearance_AppCompat_Widget_ActionBar_Subtitle style TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse style TextAppearance_AppCompat_Widget_ActionBar_Title style TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse style TextAppearance_AppCompat_Widget_ActionMode_Subtitle style TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse style TextAppearance_AppCompat_Widget_ActionMode_Title style TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值