Add local Library Project as a dependency to multiple Projects in Android Studio

You can also refer to a library outside of your project folder using the project().projectDir property. If your external library is relative to your project like so – MyLibrary – library – MyProject – app in MyProject/settings.gradle include ‘:library’ project(‘:library’).projectDir = new File(settingsDir, ‘../MyLibrary/library’) in MyProject/app/build.gradle dependencies { compile project(‘:library’) }

Recover file in Android Studio?

Can you find the file in file explorer? If you can, try to open the file through another explorer You can find your projects path by right clicking the project and hitting “File Path” Is there local history available? Try right clicking the faulty file and checking Local History -> Show History If you can … Read more

Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler

This problem occurs when there are multiple JDKs installed in your system, I had the same issue as I had mistakenly installed oracle-jdk-9 and Android studio requires oracle-jdk-8 If you are using Ubuntu you can install jdk-8 from this question. So, Make following changes as shown below: Press ctrl+shift+alt+s that will open project structure which … Read more