Fehler beim Ziel suchen mit hash-string "android-25', obwohl android-25 ist eigentlich installiert

Ich habe einen Ubuntu Xenial VM läuft in OpenStack, da ich heruntergeladen habe die neueste Android-SDK-tools ( tools_r25.2.3-linux.zip ) von https://developer.android.com/studio/index.html. Und alles ist gut konfiguriert:

  • JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  • ANDROID_HOME=<ANDROID_SDK_PATH>
  • PATH=${PATH}:${ANDROID_HOME}
  • echo "sdk.dir=<ANDROID_SDK_PATH>" > <MY_ANDROID_PROJECT_PATH>/local.properties

Aber wenn Sie versuchen, auszuführen Aufgabe: ./gradlew clean Fehler tritt auf:

Preparing "Install Android SDK Build-Tools 25".
Warning: Trying to install into ${ANDROID_HOME}/build-tools/25.0.0/ but package "Android SDK Tools 25.2.4" already exists at ${ANDROID_HOME}. It must be deleted or moved away before installing into a child directory.
Preparing "Install Android SDK Platform 25".
Warning: Trying to install into ${ANDROID_HOME}/platforms/android-25/ but package "Android SDK Tools 25.2.4" already exists at ${ANDROID_HOME}. It must be deleted or moved away before installing into a child directory.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':demo'.
> Failed to install the following SDK components:
  [Android SDK Build-Tools 25, Android SDK Platform 25]
  Please install the missing components using the SDK manager in Android Studio.

Und tatsächlich, als das Fehler-log erwähnt, ich habe die erforderlichen tools installiert. Führen Sie $ANDROID_HOME/bin/sdkmanager --list zeigt meine installierten Pakete:

Installed packages:
  Path                        | Version | Description                       | Location
  -------                     | ------- | -------                           | -------
  build-tools;25.0.0          | 25.0.0  | Android SDK Build-Tools 25        | build-tools/25.0.0/
  extras;android;m2repository | 41.0.0  | Android Support Repository, re... | extras/android/m2repository/
  platform-tools              | 25.0.2  | Android SDK Platform-Tools 25.0.2 | platform-tools/
  platforms;android-25        | 3       | Android SDK Platform 25, rev 3    | platforms/android-25/
  tools                       | 25.2.4  | Android SDK Tools 25.2.4          | tools/

Was könnte hier falsch sein? Ich bin ein bisschen misstrauisch von den SDK-Pfad hier.

InformationsquelleAutor Jing Li | 2016-12-16
Schreibe einen Kommentar