Cordova - Android SDK topilmadi

Bu erda men bilan bog'liq bo'lgan juda ko'p iplarni ko'rdim, ammo ulardan biri menga yordam berdi.

Cordova 6.5.0 o'rnatilgan va Android-Studio 6.0 (API 23) va Android 4.4 (API 19) bilan o'rnatilgan bo'lib, men ishlashni xohlayman:

cordova requirements

Men quyidagi xatoni oldi:

Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

Ok. ANDROID_HOME va PATH ni o'rnatdim:

export ANDROID_HOME=/Users/USER/Library/Android/sdk
export PATH=${PATH}:/Users/USER/Library/Android/sdk/platform-tools:/Users/italoborges/Library/Android/sdk/tools

Men ham platformalar/project.properties qatorida o'zgardi:

target=android-23

Va platformalar/android/AndroidManifest.xml qatorida:


Va platformalar/android/CordovaLib/AndroidManifest.xml ichida yuqoridagi satrda.

Men hozirda qoqilganman, chunki men topgan barcha imkoniyatlarni sinab ko'rdim.

Rahmat.

5

8 javoblar

Buning sababi nafaqat yaqinda ishlaydigan Android SDK vositalari, android buyrug'ini olib tashladi, shuningdek, android studio tomonidan o'rnatilgan SDK fayl tizimi o'zgartirildi. Siz tuzatishni kutishingiz yoki o'zingizning vaqtinchalik tuzatishingizni amalga oshirishingiz mumkin.

1, ~/Library/Android/sdk ning barcha mazmunini o'chirib tashlang

2, https://dl.google.com/android/repository/ sahifasini yuklab oling tools_r25.2.3-macosx.zip dan foydalaning va uni ~/Library/Android/sdk/tools ga joylashtiring.

3, skript satrida sdk administratorini oching ( ~/Library/Android/sdk/tools/android sdk ) va SDK ni o'rnating. 5.5.1 (API22) va 6.0 (API23 )

Hammasi shu.

8
qo'shib qo'ydi
Rahmat. Bu muammoni hal qilishning bir yo'li.
qo'shib qo'ydi muallif Sa Qada, manba

Cordova loyihangizning android platformasini yangilashingiz kerak. Cordova rasmiy saytining blogini tekshiring ( BURAYA! ) oxirgi chop etilgan versiyasini o'rganish uchun

On Windows: cordova platform update [email protected] --save

7
qo'shib qo'ydi

Kordovani yangilash masalasini hal qildim:

cordova platform rm android
cordova platform add [email protected]

undan keyin:

cordova run android
5
qo'shib qo'ydi

Xuddi shu muammo bor edi.

Quyidagilarga erishildi:

    cordova platform rm android
    cordova platform add [email protected]
3
qo'shib qo'ydi
Agar ilova nashr etilsa, bu foydali yechim emas!
qo'shib qo'ydi muallif aB9, manba

Xatoni tuzatish uchun vaqtinchalik hal qilindi:

https://github.com/apache/cordova-android/pull/367#issuecomment-286166329

Reason of the error: The latest Android SDK Tools (25.3.1) turfed the android command, which all of cordova's underlying functionality relied on.

2
qo'shib qo'ydi

Agar ushbu muammoga duch kelsangiz, jarayon quyidagi tarzda bo'lishi kerak:

1, cordova platform rm android
2, export ANDROID_HOME=/Users/USER/Library/Android/sdk
   export PATH=${PATH}:/Users/USER/Library/Android/sdk/platform-tools:/Users/italoborges/Library/Android/sdk/tools
3, cordova platform add [email protected]

(Yoki sizga kerak bo'lgan)

EXPORTSni sizning profilingizga joylashtirsangiz, unloginni unutmang,   .profil uning harakatini amalga oshirishi mumkin.

Reason: if you do not have ANDROID_HOME before setting cordova-android platform, then setting it afterwards will not work, unless you reinstall cordova-android platform.

1
qo'shib qo'ydi
men uchun ish!
qo'shib qo'ydi muallif Jonathan Nolasco Barrientos, manba

Kordovani so'nggi versiyaga yangilash masalasini hal qildim.

cordova platform update [email protected]
1
qo'shib qo'ydi

Sizning ruxsatingizni tekshiring ../Android/Sdk/tools

Ehtimol foydalanishingiz kerak

> /Android/Sdk$ chmod -R u+x tools
0
qo'shib qo'ydi