PDA

View Full Version : خطا موقع آپدیت Gradle



تبسم ساینا
یک شنبه 17 آذر 1398, 18:36 عصر
سلام وقت بخیر..
من یه پروژه با اندروید استودیو میخوام اجرا کنم، یه خطا میده.هرچیم فیلتر شکن اجرا میکنم برای آپدیتش فایده نداره..
Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJav aCompile.setDependencyCacheDir(Ljava/io/File;)V'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

کسی میدونه دلیلش چیه؟151092

soltanMohammad
شنبه 23 آذر 1398, 20:12 عصر
سلام
چرا اسکرین شات از صفحه اکتیویتی دادی؟!
محتویات فایل app/build.gradle رو بده ببینیم
به نظرم اول یه پروژه خالی ایجاد کن و ببین سینک میشه یا نه

تبسم ساینا
دوشنبه 02 دی 1398, 21:30 عصر
سلام
چرا اسکرین شات از صفحه اکتیویتی دادی؟!
محتویات فایل app/build.gradle رو بده ببینیم
به نظرم اول یه پروژه خالی ایجاد کن و ببین سینک میشه یا نه
سلام.من الان دیدم جواب دادید
هنوز مشکلم حل نشده.پروژه خالی سینک میشه.
اینم محتویات گردل:


apply plugin: 'com.android.application'

/*allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}*/

android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "***"
minSdkVersion 15
targetSdkVersion 27
versionCode 7
versionName "1.7"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {

checkReleaseBuilds false

}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}

useLibrary 'org.apache.http.legacy'

}


configurations {
all {
exclude module: 'httpclient'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
//implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.iarcuschin:simpleratingbar:0.1.5'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'org.scribe:scribe:1.3.5'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.facebook.android:facebook-login:[4,5)'
// implementation 'com.google.firebase:firebase-auth:11.8.0'
// implementation 'com.google.android.gms:play-services-auth:11.8.0'
// implementation 'com.google.firebase:firebase-messaging:11.8.0'
// implementation 'com.google.firebase:firebase-crash:11.8.0'
// implementation 'com.google.android.gms:play-services-location:11.8.0'
// implementation 'com.google.android.gms:play-services-ads:11.8.0'
// implementation 'com.google.android.gms:play-services:11.8.0'
compile 'com.android.support:multidex:1.0.1'
compile 'org.sufficientlysecure:html-textview:3.5'
compile 'co.ronash.android:pushe-base:1.4.3'
// implementation 'com.android.volley:volley:1.1.0'
}
//apply plugin: 'com.google.gms.google-services'

mehdi.safavie
سه شنبه 22 بهمن 1398, 09:06 صبح
درود;

اگر پروژه یا کلا خود اندروید استودیو روی Work Offline برای گریدل تنظیم نیست. پوشه گریدیلی که بهش متصل هستید رو حذف کنید تا دوباره دانلود بشه.
یا فیلتر شکن شما مشکل داره ، وبسایت https://developer.android.com/ رو باز کنین با همون فیلتر شکنتون. هر چند گریدیل ربطی به این وبسایت نداره ، اما بعضی فیلتر شکن ها همه چیز رو باز نمیکنن.