1

For Android Studio 0.8.14 (just downloaded) running on MacOS 10.9.5, brand new project, I get the complaint “Failed to find: com.android.support:support-v4:21.+” in the Messages Gradle Sync pane. This happens after I created a new project and in that wizard when doing "Add an activity to Mobile..." I chose "Fullscreen Activity".

If I choose different activities instead of Fullscreen when creating the project, I get different results, some good, some bad. All the bad results must be linked to the same root problem. This is What have I done wrong?

I get the same error as above if I instead choose: Master/Detail Flow Activity Settings Activity

I get no error if I instead choose: Blank Activity Blank Activity with Fragment Navigation Drawer Activity

I get “Failed to find: com.google.android.gms:play-services:4.2.42 Failed to find: com.android.support:appcompat-v7:21.+” when I choose: Google Maps Activity Login Activity

I get “Failed to find: com.google.android.gms:play-services:4.2.42" when I choose: Google Play Services Activity

I get "Failed to find: com.android.support:support-v13:21.+" when I choose: Tabbed Activity

Ben Chase
  • 13
  • 3

1 Answers1

1

Depending on which targetSdkVersion you select, the template projects may require at least one of the support libraries. You need to install them:

http://developer.android.com/tools/support-library/setup.html

  1. Start the Android SDK Manager.
  2. In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder and, if necessary, expand to show its contents.
  3. Select the Android Support Library item. Note: If you're developing with Android Studio, select and install the Android Support Repository item instead.
  4. Click the Install packages... button.
Jeffrey Mixon
  • 12,846
  • 4
  • 32
  • 55
  • Thanks, that solves it. (Actually, I think the problem was that the SDK I had was left over from trying Android dev via Eclipse. I thought I'd trashed everything before switching to Android Studio. I threw out _everything_, downloaded fresh AS, and got the Android SDK Manager to recommend installs. It included the Support Lib and Repo named in your step 3. The "new project" wiz now creates a happy FullScreen Activity project.) I'd upvote you answer, but am a newb here (obv) and so lack reputation. – Ben Chase Nov 16 '14 at 22:53
  • @BenChase No worries. Glad you got it resolved. If you click the grey Check mark next to this answer it will mark it as accepted and you will get a little bit of reputation at least. – Jeffrey Mixon Nov 16 '14 at 22:56