gpt4 book ai didi

android - 应用程序兼容错误。我已经为谷歌地图更改了 API 21。但是还是有一些错误

转载 作者:搜寻专家 更新时间:2023-11-01 08:38:11 25 4
gpt4 key购买 nike

这是我的logcat,有什么问题

D:\Android\SCBG\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\ABC\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

这是我的 build.gradle。谁能告诉我 appcompat 有什么问题。我只是初学者。请帮忙 。是compilesdkversion有问题还是其他问题?

// Top-level build file where you can add configuration options common to all sub-projects/modules.





buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'



// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}




apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion '22.0.1'

defaultConfig {
applicationId "kianyang.scbg"
minSdkVersion 14
targetSdkVersion 14
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
}

最佳答案

你的 logcat 返回

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

首先你需要升级你的compileSdkVersion & buildToolsVersion

The buildToolsVersion property specifies what version of the build tools to use .

The compileSdkVersion property specifies the compilation target.

targetSdkVersion — Specifies the API Level on which the application is designed to run. In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.

你应该使用

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'

defaultConfig {
applicationId "kianyang.scbg"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}

你应该打电话

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

然后Clean-Rebuild-Restart-Sync Your App。希望对您有所帮助。

关于android - 应用程序兼容错误。我已经为谷歌地图更改了 API 21。但是还是有一些错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34875605/

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