.Zip Gradle keshini ochib bo'lmadi. Buzuq xatolik bo'lishi mumkin

Gradle kesh xatosiga duch kelaman va uni qanday hal qilishni bilmayman. Xatoni quyidagi savolga qo'shib qo'ydim. Yig'ma to'ldirilgan turli xil echimlarni sinab ko'rdim, ammo ulardan hech biri ishlamadi. Har bir inson menga bir yechim taklif qiladi. Qo'shimcha takliflar foydali bo'lishi mumkin.

Masalan, xato: zip file.e.g ni ochib bo'lmadi Xato: zipni ochib bo'lmadi fayl.

enter image description here

2

7 javoblar

Hey kursni qo'lda o'rnatish kerak emas. Men ham bu masalani ko'ribman, lekin "C: /Users/username/.gradle/" gradusli papka yo'lidagi barcha fayllarni o'chirib tashladim oddiy qadamlarni kuzatib boring

  1. birinchi goo path "C: /Users/username/.gradle /"
  2. yuqoridagi yo'lda barcha fayllarni o'chirish.
  3. android studiya va sinxronlashtirish gradusini oching yoki qayta tiklang yoki yangi loyiha yarating.
  4. avtomatik ravishda yangi gradusli versiya fayllari va avtomatik tarzda yuklab olinadi.

*Make sure you your gradle settings like this - checked "Use default gradle wrapper(recommended) - unchecked offline work

2
qo'shib qo'ydi

Its because your gradle directory is not the directory of your gradle, to check go to android studio open your project then open File->Settings->Build,Execution, Deployment->Gradle

https://i.stack.imgur.com/wVFyh.png

2
qo'shib qo'ydi
  • Download the latest gradle package from this directory
  • Extract it and put it somewhere (for example f:\gradle-1.10)
  • Go to your Android Studio and load your project then open File->Settings->gradle, in this page click on Use local gradle distribution.
  • Type your gradle folder address there.

enter image description here

2
qo'shib qo'ydi

Siz qo'lda yuklab olishingiz mumkin, lekin bu boshqa yechimdir: Ildiz loyihada gradle-wrapper.properties 'da "https" ni "http" ga o'zgartirish .

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
to,
distributionUrl=http\://services.gradle.org/distributions/gradle-3.3-all.zip
1
qo'shib qo'ydi

Agar gradusli kostryulkalardan foydalanmoqchi bo'lsangiz - ostidagi narsani o'chirib tashlang:

.gradle/wrapper/dists/

va magistrni yangilab turing. Grader sarlavhasi noldan tushiriladi va har bir narsa yaxshi ishlashi kerak.

1
qo'shib qo'ydi
  1. Birinchidan: .gradle papkasini o'chirishga harakat qildim ish;
  2. Ikkinchidan: Eski versiya graderidan foydalanishga harakat qildim, lekin studiya meni majbur qildi gradusdan foydalaning - 3.3, shuning uchun meni uzoq vaqt davomida aralashtirib yubordi;
  3. Uchinchi: Maslahatlar istisnolarni ochib qo'yganini "java.util.zip.ZipException: zip faylini ochishda xatolik yuz berdi ", men telefonni telefon orqali unzip qilishga harakat qildim Albatta, unzip mumkin emas, shuning uchun muammo yuklab olishda bo'lishi kerak jarayon.

yechim: Men muvaffaqiyatni qurgan hamkasbimning "gradle-3.3-all.zip" faylini nusxa ko'chiraman va mening shu yo'lda o'zimni almashtiraman ".gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all. zip "

1
qo'shib qo'ydi

Men bu muammoni HomeBrew-ni Mac yordamida Gradle-ni o'rnatish bilan hal qildim. Terminalda gradle -v yozsangiz va buyrug'i topilmadi: gradle ni ko'rsangiz, bu haqda Macda bu muammoni hal qilish uchun bu usuldan foydalanishingiz mumkin:

  1. First install the Gradle with Homebrew: brew install gradle

  2. Then go to Android Studio, open Android Studio->Preferences->Build,Execution,Deployment->Gradle, under Project-level settings check: Use local gradle distribution and set Gradle home with: '/usr/local/Cellar/gradle/3.5/libexec' (3.5 is my gradle version)

  3. Try again, and if the version is not correct, you can manually download the specified version from gradle website (the version specified in the file /gradle/wrapper/gradle-wrapper.properties: distributionUrl=), extract the downloaded zip file to the location and set the Gradle home to it in Android Studio.

Bu yordamga umid qilaman.

0
qo'shib qo'ydi