
After the gradle has finished sync it will build successfully.
Step 5 : Build the gradle again by clicking on Try Again. SleepSampleKotlin (Kotlin) - Demonstrates use of the Sleep API to recognize a user's sleep activity. LocationUpdatesBackgroundKotlin (Kotlin) - Demonstrates the correct way to retrieve location updates in the background. > A window will pop up, click on Build,Execution,Deployment -> Gradle ->Use local gradle distribution and locate the gradle-3.3 location which you recently copied as shown below and click on OK LocationAddress (Kotlin) - Use the Geocode API to display a device's location as an address. Inorder to do that goto File -> Settings. gradle file, located in the root project directory, defines build configurations that apply to all modules in your project. You will still be able to see the error since we have not specified the gradle location. Now paste the folder copied in the above step as shown below (when asked for administrator permissions press continue ).
Step 3 : Navigate to C: -> Program Files -> Android -> Android Studio -> gradle and delete the folder named gradle-3.3.
Step 2 : Extract the zip and copy the folder named gradle-3.3.Step 1 : Download the gradle manually from here -> Download .Follow the steps properly in order to get rid of the gradle’s dependency problem in Android Studio. In this post i will explain how i solved this problem.