在包"android"中找不到属性"roundIcon"的资源标识符 [英] No resource identifier found for attribute 'roundIcon' in package 'android'
本文介绍了在包"android"中找不到属性"roundIcon"的资源标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编译我的Project,但是有一些错误
I'm trying to compile my Project,but in there is some error
Android manifest.xml
Android manifest.xml
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
我已经尝试重建项目或与gradle同步,但是它对我不起作用.
I already try to rebuild project or sync with gradle but it's not working for me.
我的依赖项
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile project(':circleimageview-2.0.0-sources')
如何解决此错误?我是Android Studio的新手.
How to fix this error? I'm newbie to Android Studio.
推荐答案
roundIcon
is an attribute that was first introduced for Android Nougat 7.1 (API level 25), therefore you have two available options based on the type of device you're targeting:
- 如果您要构建专门针对Android 7.1或更高版本的应用,请确保在应用的
build.gradle
中将minSdkVersion
和targetSdkVersion
设置为25:
- If you're building an app specifically for Android 7.1 or above, ensure that
minSdkVersion
andtargetSdkVersion
are set to 25 in your app'sbuild.gradle
:
defaultConfig {
minSdkVersion 25
targetSdkVersion 25
}
- 或者,如果要定位较旧的API级别,则需要从清单中删除
android:roundIcon
,而仅使用android:icon
. - Alternatively, if you want to target older API levels, you will need to remove
android:roundIcon
from your manifest and only useandroid:icon
.
这篇关于在包"android"中找不到属性"roundIcon"的资源标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文