-3

I am a beginner Android Programmer. i have android project source but can not run and have error Sync failed. my android studio version is 3.2.1 sdk version from api 19 to api 26 gradle version 3.2.1 to 5.1 download from gradle website

Error when sync project

image :Error when sync project

Gradle Setting

image : Gradle Setting

Gradle-wrapper-properties

image :Gradle-wrapper-properties

gradle setting

image : gradle setting

i tested offline mode and in setting use local gradle distribution but can not sync project

Run button

image : Run button

and run button disable !!!

After set Proxy to android studio and download some file

Cannot create variant 'android-manifest-metadata' after configuration ':app:debugApiElements' has been resolved
Mostafa Bagheri
  • 366
  • 2
  • 7
  • 19
  • I think it's a network issue, please resync it again – Basi Jan 07 '19 at 04:54
  • in Gradle-wrapper-properties file i changed Gradle version to 3.2.1 but i have error Sync Failed and Gradle DSL method not found: 'google()' Possible causes:
    • The project 'ContactsMapAndroid' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.2.1 and sync project
    • The project 'ContactsMapAndroid' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
    • The build file may be missing a Gradle plugin. Apply Gradle plugin
    – Mostafa Bagheri Jan 07 '19 at 04:56
  • Tanks Basi But Im Trying from yesterday – Mostafa Bagheri Jan 07 '19 at 04:59
  • Possible duplicate of [android studio error Error:Connection timed out](https://stackoverflow.com/questions/35667711/android-studio-error-errorconnection-timed-out) – Basi Jan 07 '19 at 04:59
  • Hi , I Setup Proxy Setting Android studio by https://github.com/freedomofdevelopers/fod And After Download Some Files I give Error " Could not find gradle.jar (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.jar " – Mostafa Bagheri Jan 07 '19 at 10:34

1 Answers1

0

make sure u have high speed internet connection , in sudan we have another problem that is some sites are blocked from us we use vpn applications before we can synchronizing the project ,to check that try to rich developer.android.com from browser

Fox
  • 1
  • 2
  • Tanks fox for answering I dont think its speeding up the internet Gradle sync failed: Could not find gradle.jar (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.jarConsult IDE log for more details (Help | Show Log) (499 ms) – Mostafa Bagheri Jan 07 '19 at 11:10