Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using intelliJ with gradle OFFLINE for android development

I'm going to be going away and will have long periods without internet connection. I currently use IntelliJ with the android SDK to develop. When I try to create a project with no internet connection, it gives me a gradle http error.

I did some searching and downloaded the 1.8 zip from groovy's website, but can't get intellij to use it (zipped or unzipped).

I haven't been able to find a good guide to making this work so I'm seeing if anybody here can point me to one. Thanks a ton in advance

like image 646
Psest328 Avatar asked Jan 14 '14 17:01

Psest328


2 Answers

Android Studio 0.4 supports offline mode for Gradle.

enter image description here

For Groovy question:

Right click on module > Add Framework Support...

enter image description here

Click on Create...

Choose Groovy distribution location.

enter image description here

Or create a new Groovy module:

enter image description here

If you don't have Groovy module listed, make sure you have Groovy plugin enabled.

like image 158
kukido Avatar answered Oct 12 '22 14:10

kukido


for the offline-part of the quiestion: AndroidStudio 0.5.2 does not have the checkbox described by @kukido but an inputfield Gradle Commandline-optionions where you can enter "--offline".

Alternatively you can ad this to the settings.gradle file

 // else build may fail because of missing internetconnection
 startParameter.offline=true
like image 21
k3b Avatar answered Oct 12 '22 15:10

k3b