I have no internet connection. I want to use android studio but it gives me Gradle sync errors every time I try to use it.
Is there a way to run android studio without internet?
Note that I have SDK and JDK running well.
My java codes are not resolved too.
Download the latest gradle file from here. Then in your Android Studio goto File->Settings->Build,Execution,...->Build Tools->Gradle. Then In the right side Check the "Use local gradle distribution" and then set the downloaded file as your gradle home. Below, in the Global gradle settings check the Offline Work option.->Click Ok.
DONE
But Even though doing this will let you create a simple android app, you won't be able to import any external libs.
For Android Studio 2.3.0.8 (2/Mar/2017):
[android-studio-path]\gradle\gradle-3.2
or whatever version there, and check "Offline Work" option there.Degrade the targeted gradle version of the project\build.gradle (not the app\build.gradle) like that (it was 2.3.0):
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
Goto File->Project Structure->Modules->Dependencies, remove all but:
{include=[*.jar], dir=libs}
com.android.support.appcompat-v7:23.3.0
com.android.support.constraint:constraint-layout:1.0.0-alpha7
Sync.
Be aware that the tricky IDE disables "Offline Work" option without notification, so you need to:
Firewall those or it will download without notification:
[android-studio-path]\jre\bin\java.exe
[android-studio-path]\bin\studio64.exe|studio.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With