آموزش های این وب سایت به صورت رایگان در دسترس است. اطلاعات بیشتر
مشکل عدم دسترسی خریداران پیشین به برخی آموزش ها برطرف شد
بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]

عدم bulid و sync شدنه gradle در Andriod Studio 3.2.1

Mpz  5 سال پیش  5 سال پیش
0 0

سلام
بعد از اینکه به Andriod Studio 3.2.1  آپدیت کردم در ساختن پروژه جدید با مشکل عدم sync gradle مواجه میشم
اول طبق آموزش ها رفتم مشکل حل نشد
بعد با استفاده از فیلتر شکن و وصل بودن مداوم Andriod Studio برنامه رو دوباره نصب و از اول sdk مورد نیاز رو نصب کردم مشکل حل نشد
در سایت stackoverflow هم سرچ کردم با جواب های کاربرای اونجا مشکل حل نشد
هر راه دیگه ای هم که به ذهنم میرسید انجام دادم بعد دو روز نتونستم حلش کنم
لطفا اگر میدونید چی کار باید کنم بگید
خطایی که باهاش مواجه میشم این هست
Could not find com.android.tools.build:gradle:3.2.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.jar
Required by:
project :
Open File
Enable embedded Maven repository and sync project

0 0
لینک (5 سال پیش)
 برای این سوال 1 پاسخ وجود دارد. مشاهده پاسخ صحیح
پاسخ به سوال 
sana ebadi  5 سال پیش
+2 0

 پاسخ صحیح

 

۱.صبر و حوصله ی برنامه نویس و کار افرینیش و به کار بردن یه سری راهکار ها

۲.داشتن اکانت VPN یا استفاده از راه های رایگان ولی معتبر مثل پراکسی یا FOD

پروکسی برای اندروید استودیو ست کنید.
mirror.vtwo.org..... 8850


۳.آپدیت بیلد تولز ها و نسخه ی گریدل به جدیدترین ورژن و هم چنین نسخه ی خود استودیو

۴.برداشتن تیک OFFLINE WORK از تنظیمات گریدل


و تنظیمات فایل ها در اندروید استودیو ورژن 3.2 (STABLE )


gradle-wrapper.properties


#Sun Sep 30 13:21:15 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip


buil.gradle(Project:test)

 

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

buildscript {

repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()


}
}

task clean(type: Delete) {
delete rootProject.buildDir

 

 



buil.gradle(module:app)

 

apply plugin: 'com.android.application'


android {
compileSdkVersion 27
defaultConfig {
applicationId "sanaebadi.info.test"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
}
}


}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

 


که برای دپندنسی ها میتونی از androidx ‌هم استفاده کنید

به این صورت :

 

 

build.gradle(module:app) (androidx with Kotlin)


 

 

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 28
defaultConfig {
applicationId "sanaebadi.info.databindinginkolinworld"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
// notice that the compiler version must be the same than our gradle version
kapt 'androidx.databinding:databinding-compiler:3.2.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'


}

 

 

 

 

0 0
سلام و ممنون از خانم عبادی لینک (5 سال پیش)

پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .