Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio 1.0 adding proxy to startup script

I'm trying to run android-studio 1.0 on ubuntu using start up script but as i'm behind proxy the android studio gets stuck at "Fetching android sdk component information" and never downloads it. This occurs when i start android script from /bin/studio.h , at startup android-studio tries to download sdk but as i'm beyond proxy it won't download sdk.

I tried adding -Dhttp.proxyHost= and -Dhttp.proxyport in studio.vmoptions still doesn't fetch sdk. As it gets stuck in the fetching screen i'm unable to get GUI and hence not able to set proxy from GUI as well. Also get this error after starting " WARN - ateSettings.impl.UpdateChecker - Connection failed. Please check your network connection and try again."

Let me know if there is an workaround for this , thanks

like image 751
user3826306 Avatar asked Dec 10 '14 14:12

user3826306


3 Answers

Go to the install location, open bin directory, edit the idea.properties, add below line to the file's end:

disable.android.first.run=true

Then open android studio, set the proxy in configuration and close again.

Remove the line disable.android.first.run=true from idea.properties and open android studio again.

After this, you can work behind a proxy.

like image 176
user2617687 Avatar answered Nov 01 '22 23:11

user2617687


Go to the install location, open bin directory,edit the idea.properties, add below line to the file's end.

"disable.android.first.run=true" 

After that,when you entre the "Welcome to Android Studio",you may need to reconfig your android sdk and jdk location in Config/Project Defaults/Project Structure.

like image 9
Geng Jiawen Avatar answered Nov 01 '22 22:11

Geng Jiawen


For earlier versions of android studio. Currently it has a UI for setting proxy.

This helped me,

Blog post: Installing Android Studio behind proxy

Navigate to the android-studio/bin directory

you need to edit idea.properties script to skip the initial set up page

so run nano idea.properties and add this line at the end of the script

disable.android.first.run=true

save the script and the run ./studio.sh

On the window that appears go to configaration>http proxy then set your proxy.

Exit and then edit idea.properties file and remove the line you added i.e sudo nano ideas.properties then delete disable.android.first.run=true save and exit , then run

./studio.sh

You will be good to go now.

like image 1
Murungi Wilson Avatar answered Nov 02 '22 00:11

Murungi Wilson