Gradle Sync Error SOLVED in Android Studio.

Solving The Gradle Sync Error

             

                        When we open an Android Studio project we can find an error in syncing the gradle. This is due to the SDK level of the Android studio in which the program is written is not installed in the android studio in which you are running the program.The error may appear like this.

  Run the program and look for the target SDK level. In my case it is android-21.

To confirm if android21 platform is not installed go to the location of your sdk file in C drive.
In sdk folder search for platform and open it. Check if android 21 is present. If there is no file named android21, This is why the reason for this error.

Solution:

    1)Go for SDK manager in android studio.
    2)Click on Stand alone SDK manager in the bottom.

    3)Find Android 5.0.1(API 21) and install this. This is the missing sdk platform.
    4)Wait for it to download and install.
    5)After installing check in C->Android->SDK->Platforms folder if android-21 folder is present.
    6)Now run the program. The gradle is now synced.



Watch this video tutorial if u face the problem still.


                 Click here for video



Thank You.    








Comments