gpt4 book ai didi

android - 将 API 级别从 23 更改为 22 时出错

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:52:46 24 4
gpt4 key购买 nike

我想将 Android Studio 中的最低 SDK 版本从 API 23 更改为 API 22,因为 API 23 不支持 HttpClient。我尝试在 build.gradle(Module:app) 中更改它,即我已将 compileSdkVersion 从23 到 22,targetSdkVersion 从 23 到 22。

android {
compileSdkVersion 23
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.test.gcmgreetingapp"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile project(':android-query-full.0.26.7')
compile 'com.loopj.android:android-async-http:1.4.8'
}

然后,同步并重建项目。但是我在 gradle 控制台中收到以下错误

AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:TextAppearance.Material.Widget.Button.Inverse\u0027.","sources":[{"file":"C:\\Users\\nischal.manandhar\\AndroidStudioProjects\\GCMGreetingApp\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\res\\values-v23\\values-v23.xml","position":{"startLine":1}}],"original":""}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:Widget.Material.Button.Colored\u0027.","sources":[{"file":"C:\\Users\\nischal.manandhar\\AndroidStudioProjects\\GCMGreetingApp\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\res\\values-v23\\values-v23.xml","position":{"startLine":1}}],"original":""}


FAILED

FAILURE: Build failed with an exception.

错误在文件v23\values-v23.xml

任何帮助将不胜感激。谢谢!!!

最佳答案

在您的 AndroidManifest.xml 中更改它

    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />

干杯

关于android - 将 API 级别从 23 更改为 22 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32116484/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com