Android Studio: could not find google goal apis: 8

I tried to import an example from the Internet that seems to be made in Eclipse.
I am using Android Studio and it gives me this error.

What should I do after opening the SDK manager?

Error:Cause: failed to find target Google Inc.:Google APIs:8 : /Users/wangel/Library/Android/sdk
<a href="openAndroidSdkManager">Open Android SDK Manager</a>
+4
source share
2 answers

You need to open your Android SDK Manager, which you can make from Android Studio ( Tools - Android - SDK Manager ) and install the corresponding version of the SDK, which in your case is 8 .

Once this is done, try importing the example again or, if it has already been imported, do a cleanup and rebuild ( Build-Clean Project .

+1

, compileSdkVersion Gradle.build 8 sdk, .

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 18
    }
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
}
0

Source: https://habr.com/ru/post/1584945/


All Articles