Android values-v23.xml错误。检索项的父项时出错
我在values-v23.xml中遇到以下错误: 错误:(3)检索项的父项时出错:未找到与给定名称“android:TextAppearance.Material.Widget.Button.Inverse”匹配的资源。 错误:(18)检索项的父项时出错:未找到与给定名称“android:Widget.Material.Button.Colored”匹配的资源 我的身材。格雷德尔:Android values-v23.xml错误。检索项的父项时出错,android,xml,Android,Xml,我在values-v23.xml中遇到以下错误: 错误:(3)检索项的父项时出错:未找到与给定名称“android:TextAppearance.Material.Widget.Button.Inverse”匹配的资源。 错误:(18)检索项的父项时出错:未找到与给定名称“android:Widget.Material.Button.Colored”匹配的资源 我的身材。格雷德尔: apply plugin: 'com.android.application' android {
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "example.transportmanagement"
minSdkVersion 17
targetSdkVersion 21
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:21.0.3'
compile 'com.google.android.gms:play-services:8.4.0'
}
我想在API21上编译。我读了很多问题,但有人告诉我把sdkversion改为23。如何使用API 21解决此错误
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.transportmanagement"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/im4"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="example.transportmanagement.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.SignUp"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.SignUp" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.Login"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.Login" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.SelectAddress"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.SelectAddress" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.Driver"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.Driver" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.FindBus"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.FindBus" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.MapsActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.MapsActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="example.transportmanagement.DriverMaps"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.example.transportmanagement.DriverMaps" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
</application>
</manifest>
如果要为API 21编译,为什么项目中有文件值v23 如果您使用Valuev 23 android studio,请理解您想要的是API 23应用程序
因此,请尝试删除此文件或使用v21重命名它。它应该可以工作您可以使用SDK和Build tools 23进行编译,但仍然可以在API 17..21上定位并运行代码在遇到multidex达到65K方法限制的问题之前,请阅读本文。已从AndroidStudioProjects\TransportManagement\app\build\intermediates\res\merged\中删除值v23.xml文件。。。但是当我重建项目时,它再次生成并显示相同的错误。你能添加AndroidManifest和Android Studio配置构建的图片吗?我已经添加了清单细节。你告诉我分享配置的图片。我不明白。如何获取配置的详细信息,以便我可以与您共享。由于我是新手,对所有这些我都不太了解:(有没有其他方法可以让我自己在21时编译。你能解释一下为什么要这样做吗?如果我在23时编译,目标是21时,我是否也需要处理运行时权限?因为23需要。问这个问题可能很傻,但我在这方面比较新。提前感谢你,你只需要获得API 23设备上的权限。你应该虽然不是针对那些设备,但你只是在编译代码,以便包含那些缺少的资源。我的个人测试设备是API 21,我使用最新的SDK编译,运行良好,如果这让你感觉更好的话。谢谢。我将更新我的SDK并尝试这样做。如果我再次卡住,我将删除注释。