I'd like to migrate my Eclipse project to Android Studio. I used to build the project with minSdkVersion=8, but I want to add new functionality that requires minSdkVersion 10.
I'm running Android Studio 1.1.0. After importing the Eclipse project ("Import project" on the main AS screen), I go to the "Project Structure" window, select the "Flavors" tab, and specify API 10 (Gingerbread) for min sdk and target sdk. When I rebuild the project, I get over 100 errors in the console that look like this:
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
Any ideas why I am getting these errors? How to fix this?
Thanks! Tom
The cause - and solution - to the problem is due to incompatibility with between my specified minSdkVersion and the app-compat library, as described here.
Just change the minSdkVersion to 'XX' sync the gradle. The concept is better explained in the below link.
compileSdkVersion 23
minSdkVersion 10
targetSdkVersion 23
https://medium.com/google-developers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd?linkId=20147489#.o6ctvrkgj
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With