0

When I`ve installed the module Volley in android studio I receive the error:

Error:A problem occurred configuring project ':volley'. failed to find target with hash string 'android-22' in: C:\Users\ egen\AppData\Local\Android\sdk Open Android SDK Manager

I've installed the android support repository what is wrong here?

EDIT

Now I receive the error:

Error:(10, 1) A problem occurred evaluating root project 'Fysio5'.

Could not find method compile() for arguments [directory 'libs'] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@79554741.

This is my build.gradle:

 // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile project(":volley")
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
Jamie
  • 10,302
  • 32
  • 103
  • 186
  • Check if [this answer](http://stackoverflow.com/q/18068920/1793718) helps. In your case its Android SDK 22 which is missing. Here's a related question http://stackoverflow.com/questions/32715418/failed-to-find-target-with-hash-string-android-22 – Lucky Sep 30 '15 at 12:55

2 Answers2

1
  1. Go to app/src/build.gradle (see 1st image) enter image description here

  2. Change the compileSDKVersion 22 to 19 (or to the API level that you are using)

  3. Sync the project (see 2nd image) enter image description here
William Ku
  • 798
  • 5
  • 17
0

Seems, you don't have the Android 5.1.1 (API 22) SDK installed. Open the Android SDK manager to check and install if necessary.

Henry
  • 42,982
  • 7
  • 68
  • 84
  • I've installed that now I receive another error -_- please see my edit. – Jamie Sep 30 '15 at 14:37
  • This is a new question totally unrelated to the first one. Please post a new question, don't change the original question. – Henry Sep 30 '15 at 16:31