gpt4 book ai didi

android - "No resource found"构建应用时出错

转载 作者:行者123 更新时间:2023-12-03 13:28:16 25 4
gpt4 key购买 nike

我想将我的 Eclipse 项目迁移到 Android Studio。我曾经使用 minSdkVersion=8 构建项目,但我想添加需要 minSdkVersion 10 的新功能。

我正在运行 Android Studio 1.1.0。导入 Eclipse 项目(AS 主屏幕上的“导入项目”)后,我转到“项目结构”窗口,选择“Flavors”选项卡,并为 min sdk 和 target sdk 指定 API 10 (Gingerbread)。当我重建项目时,我在控制台中收到超过 100 个错误,如下所示:

Information:Gradle tasks [clean, :jellyWatch:compileDebugSources] :jellyWatch:clean :jellyWatch:preBuild UP-TO-DATE :jellyWatch:preDebugBuild UP-TO-DATE :jellyWatch:checkDebugManifest :jellyWatch:preReleaseBuild UP-TO-DATE :jellyWatch:prepareComAndroidSupportAppcompatV72200Library :jellyWatch:prepareComAndroidSupportMediarouterV72200Library :jellyWatch:prepareComAndroidSupportSupportV42200Library :jellyWatch:prepareComGoogleAndroidGmsPlayServices750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesAds750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesAppindexing750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesAppstate750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesBase750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesCast750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesDrive750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesFitness750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesGames750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesGcm750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesIdentity750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesLocation750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesMaps750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesNearby750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesPanorama750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesPlus750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesSafetynet750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesWallet750Library :jellyWatch:prepareComGoogleAndroidGmsPlayServicesWearable750Library :jellyWatch:prepareDebugDependencies :jellyWatch:compileDebugAidl :jellyWatch:compileDebugRenderscript :jellyWatch:generateDebugBuildConfig :jellyWatch:generateDebugAssets UP-TO-DATE :jellyWatch:mergeDebugAssets :jellyWatch:generateDebugResValues UP-TO-DATE :jellyWatch:generateDebugResources :jellyWatch:mergeDebugResources /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/src/main/res/drawable/creative_commons.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/src/main/res/drawable/mapmarker.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/src/main/res/drawable/other_29.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/src/main/res/drawable/license_label.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/src/main/res/drawable/mapmarker_large.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited :jellyWatch:processDebugManifest :jellyWatch:processDebugResources /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/values-v11/values.xml Error:(47, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(47, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(47, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(47, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/values-v14/values.xml Error:(17, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(17, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(17, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(17, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/values-v17/values.xml Error:(7, 21) No resource found that matches the given name: attr 'android:paddingEnd'. Error:(11, 21) No resource found that matches the given name: attr 'android:layout_marginEnd'. Error:(10, 21) No resource found that matches the given name: attr 'android:paddingStart'. Error:(7, 21) No resource found that matches the given name: attr 'android:paddingEnd'. Error:(10, 21) No resource found that matches the given name: attr 'android:paddingStart'. Error:(7, 21) No resource found that matches the given name: attr 'android:paddingEnd'. Error:(21, 21) No resource found that matches the given name: attr 'android:layout_marginStart'. Error:(24, 21) No resource found that matches the given name: attr 'android:layout_alignParentStart'. Error:(25, 21) No resource found that matches the given name: attr 'android:textAlignment'. Error:(7, 21) No resource found that matches the given name: attr 'android:paddingEnd'. Error:(10, 21) No resource found that matches the given name: attr 'android:paddingStart'. Error:(24, 21) No resource found that matches the given name: attr 'android:layout_alignParentStart'. Error:(35, 21) No resource found that matches the given name: attr 'android:layout_toStartOf'. Error:(38, 21) No resource found that matches the given name: attr 'android:layout_alignParentEnd'. Error:(42, 21) No resource found that matches the given name: attr 'android:layout_toEndOf'. Error:(35, 21) No resource found that matches the given name: attr 'android:layout_toStartOf'. Error:(21, 21) No resource found that matches the given name: attr 'android:layout_marginStart'. /Users/oreilly/Documents/workspace/JellyWatch1/jellyWatch/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/values-v21/values.xml Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Subtitle'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Title'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.TextView.SpinnerItem'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Small'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'. Error:(285, 21) No resource found that matches the given name: attr 'android:overlapAnchor'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'. Error:(285, 21) No resource found that matches the given name: attr 'android:overlapAnchor'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.RatingBar'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.TextView.SpinnerItem'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'. Error:(146, 21) No resource found that matches the given name: attr 'android:colorAccent'. Error:(148, 21) No resource found that matches the given name: attr 'android:colorControlActivated'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(144, 21) No resource found that matches the given name: attr 'android:colorPrimary'. Error:(145, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'. Error:(146, 21) No resource found that matches the given name: attr 'android:colorAccent'. Error:(148, 21) No resource found that matches the given name: attr 'android:colorControlActivated'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(144, 21) No resource found that matches the given name: attr 'android:colorPrimary'. Error:(145, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'. Error:(146, 21) No resource found that matches the given name: attr 'android:colorAccent'. Error:(148, 21) No resource found that matches the given name: attr 'android:colorControlActivated'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(144, 21) No resource found that matches the given name: attr 'android:colorPrimary'. Error:(145, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'. Error:(146, 21) No resource found that matches the given name: attr 'android:colorAccent'. Error:(148, 21) No resource found that matches the given name: attr 'android:colorControlActivated'. Error:(79, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'. Error:(78, 21) No resource found that matches the given name: attr 'android:colorControlNormal'. Error:(144, 21) No resource found that matches the given name: attr 'android:colorPrimary'. Error:(145, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'. Error:Execution failed for task ':jellyWatch:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/oreilly/android-sdk-macosx/build-tools/21.1.2/aapt'' finished with non-zero exit value 1 Blockquote



任何想法为什么我会收到这些错误?如何解决这个问题?

谢谢!
汤姆

最佳答案

问题的原因和解决方案是由于我指定的 minSdkVersion 和 app-compat 库之间的不兼容,如 here 所述.

关于android - "No resource found"构建应用时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31931024/

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