【发布时间】:2016-06-22 08:21:26
【问题描述】:
我使用以下 build.gradle 详细信息构建了我的 android 应用程序:
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
当我尝试更改 compileSdkVersion 时,出现了几个错误:
Error:(41, 5) No resource found that matches the given name: attr 'android:borderlessButtonStyle'.
Error:(41, 5) No resource found that matches the given name: attr 'android:buttonBarStyle'.
Error:(41, 5) No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
Error:(46, 5) No resource found that matches the given name: attr 'android:borderlessButtonStyle'.
Error:(46, 5) No resource found that matches the given name: attr 'android:buttonBarStyle'.
Error:(46, 5) No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
Error:(57, 5) No resource found that matches the given name: attr 'android:actionModeCopyDrawable'.
Error:(57, 5) No resource found that matches the given name: attr 'android:actionModeCutDrawable'.
Error:(57, 5) No resource found that matches the given name: attr 'android:actionModePasteDrawable'.
Error:(57, 5) No resource found that matches the given name: attr 'android:buttonBarButtonStyle'.
Error:(57, 5) No resource found that matches the given name: attr 'android:buttonBarStyle'.
Error:(57, 5) No resource found that matches the given name: attr 'android:textColorAlertDialogListItem'.
Error:(57, 5) No resource found that matches the given name: attr 'android:textColorHighlightInverse'.
Error:(57, 5) No resource found that matches the given name: attr 'android:textColorLinkInverse'.
Error:(57, 5) No resource found that matches the given name: attr 'android:windowActionBar'.
Error:(108, 5) No resource found that matches the given name: attr 'android:actionModeCopyDrawable'.
Error:(108, 5) No resource found that matches the given name: attr 'android:actionModeCutDrawable'.
Error:(108, 5) No resource found that matches the given name: attr 'android:actionModePasteDrawable'.
Error:(108, 5) No resource found that matches the given name: attr 'android:buttonBarButtonStyle'.
Error:(108, 5) No resource found that matches the given name: attr 'android:buttonBarStyle'.
Error:(108, 5) No resource found that matches the given name: attr 'android:textColorAlertDialogListItem'.
Error:(108, 5) No resource found that matches the given name: attr 'android:textColorHighlightInverse'.
Error:(108, 5) No resource found that matches the given name: attr 'android:textColorLinkInverse'.
Error:(108, 5) No resource found that matches the given name: attr 'android:windowActionBar'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
我浏览了一些链接,但仍有一些疑问:
- https://medium.com/google-developers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd#.5iwgderha
- Compile android project with a higher sdk
- AppCompat v7 r21 returning error in values.xml?
- Run app with higher SDK on lower SDK
我担心的是,如果我用 sdk 版本 23 编译这个应用程序,它是否能在 8-23 之间的所有 sdk 版本上运行良好。
此外,将 compileSdkVersion 更改为 8 是否可行且可取,它会以任何方式改变应用程序的性能吗?
非常感谢任何建议。
【问题讨论】:
-
您是否在使用支持库(即 com.android.support:appcompat-v7:21.0.0)??
-
我正在使用(编译'com.android.support:appcompat-v7:23.3.0')
标签: android