Sunday 15 April 2018

Unable to resolve dependency for 'app@debugcompileClasspath' Could not resolve android studio


Video url 

Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Error:-
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)

Now step by step to solve this error

STEP 1. First Check your Project-level setting at 
   File>setting>Build,Execution,Deployment>BuildTools>Gradle
And select the option
Use Default gradle Wrapper(recommende)
And uncheck offline work (if the offline work option is checked)
  
        

Step 2. Now create the new project to check the gradle version and android plugin version 

Step 3Go File>Project Structure>Project 





Step 4.Now copy that all information 
 Gradle version
 plugin version
 Android plugin repository,
 Default plugin Repository

STEP 5. Now open the Previous android project where the gradle error occur

STEP 6.Go File> Project Structure> Project> and change the 
 Gradle version
 plugin version
 Android plugin repository
 Default plugin Repository


Step 7.Sync the gradle now 

Step 8 now change the TragetSdkVersion and  ComplileSdkVersion 

Step 9 .change the dependencies


Tuesday 10 April 2018

How to Reduce Android Studio Project Size

Whenever we build the project some files will be automatically generated and occupy more space in android studio project folder.
 Build folder that automatically created when we build any project
 STEP 1. Go to your android studio project folder then app->build folder
 STEP 2. Delete the build folder under the app folder(don't worry it will automatically created when you will build the project again)
 STEP 3. Then delete the another build folder under the main android studio project folder (don't worry it will automatically created when you will build the project again)
 STEP 4. Now the size of your Android studio project decrease
 STEP 5. You can send this project to another person and don't worry it will automatically created those file when the person again build and run the project.