Can't sync Gradle in Android Studio in Iran - android-studio

I use Android Studio version 1.5.1,
and I'm trying to compile 'com.android.volley:volley:1.0.0' in build.gradle, but I can't sync Gradle.
I think this error is because of my Internet connection or access being blocked from my country (Iran).

Yes, it's because Google has been blocked in Iran since 2012.
You can use a proxy app like Shadowsocks to change your country.
After activating your proxy app, in Android Studio go to
file->setting->Appearance & Behavior->System Setting->HTTP Proxy
active 'Manual proxy configuration'
and set:
host name:127.0.0.1 (for example)
port name:1080 (for example)
and reset Android Studio. When Android Studio resets, activate the HTTPS proxy and sync your Gradle and it will work. ;)

Certainly Google as an american company has to obey US foreign policies. Google has too many services, among them those which relate to developers are blocked. There are many ways to work around these bans using proxies and VPNs but i personally wish for changes to happen between Iran and US.

you have to install any connect and set cisco username and password
and restart android studio

Put this info in your Android Studio proxy settings:
address: fodev.org
port:8118
Put these lines on gradle.properties file in your project:
systemProp.http.proxyHost=fodev.org
systemProp.http.proxyPort=8118
systemProp.https.proxyHost=fodev.org
systemProp.https.proxyPort=8118
For more information see this repository: https://github.com/freedomofdevelopers/fod

Related

Android studio cant download sdk with v2ray

I am an Android developer in Iran
There are too many restrictions for the Internet
Fortunately, V2ray
has solved the problem to some extent, but Android Studio has serious problems with V2ray
no library is downloaded, it does not even allow to download SDK.
I have tried all the VPNs but none of them work
IN IRAN no VPN is working to use for android studio these days , only proxy is available , do it this way inside AS :
IN WINDOWS GO TO Setting >
Appearance & Behavior ->System Settings -> Http Proxy
http proxy
Manual proxy configuration
MORE :
https://dazhyarco.net/%D9%86%D8%B5%D8%A8-%D8%A7%D9%86%D8%AF%D8%B1%D9%88%DB%8C%D8%AF-%D8%A7%D8%B3%D8%AA%D9%88%D8%AF%DB%8C%D9%88/#
CHANGE :
Host name > fodev.org
Port number > 8118
Apply AND OK
.
Thank you #iDeveloper
even you can use the auto-detect proxy setting and android studio use the proxy setting of os that you run v2ray
Like you, I am in Iran
use this dns in your pc :
178.22.122.100
185.51.200.2
AND turn off v2ray.
or use similar site of shekan.ir

Intercept Android Studio Emulator HTTPS Traffic with Burp Suite (it's like HTTP but with an 'S')

I don't even know why I am asking this question as I am sure no one actually knows an answer. I just want to intercept HTTPS traffic with burp suite while using the android studio emulator.
I did everything. Installed the certificate, proxied through android studio, proxied through the phone and android studio, proxied through the phone alone, messed with the certificates, it's all HTTP. all the other traffic gets the usual "Received fatal alert: certificate_unknown". I think the only way to do it is to root the phone somehow and then install a "rooted certificate" (rooting an emulator sounds so dumb...), god knows that won't be easy.
So, if you don't know how to intercept HTTPS traffic on android studio emulator, please suggest a better emulator where you can do that (with a google play store), in the comments.

No Android SDK found SDK tools directory missing

Basically I just installed for the first time in my life Android Studio android-studio-ide-182.5264788-windows.exe and when I open it I get:
Missing SDK, No Android found SDK found
I also checked this path: C:\Users\<user>\AppData\Local but I have not found and Android folder there because I was looking for C:\Users\<user>\AppData\Local\Android\Sdk
If I press next next finish I get:
Nothing to do!
Android SDK is up to date.
SDK tools directory is missing
I have also checked all kind of solutions posted on the internet but none of them fixed my problem.
I figured it out meanwhile but I forgot to update the question. Basically I had those issues because of the corporate proxy which was blocking some resources when installation was in progress.
The solution for me was to configure the proxy inside Android Studio under System Settings > HTTP Proxy. I have set it to Manual proxy configuration.
Besides this I also had to configure some security certificate inside the Java Version which was used by Android Studio. I used this code to do that: https://knowledge.digicert.com/solution/SO4085.html
The last thing was to run this: sdkmanager --licenses. I tried first in cmd but it was not working, I don't know for what reason but after I tried in Idea it worked.
After all of these, it worked. I had a small issue with the .. but it got fixed after I went in Setings > Build, Execution, Deployment > Instant Run and disabled Instant Run.
Download the zip file: http://dl.google.com/android/android-sdk_r24.4.1-windows.zip
Unzip it to SDK directory, and files like this:
D:\Android_sdk\platforms
D:\Android_sdk\tools
D:\Android_sdk\SDK Manager.exe
D:\Android_sdk\SDK Readme.txt
Restart Adnroid Studio, Configure->SDK Manager
Then you can change the Android SDK Location to your SDK path
After installation Click on configuration Go to SDK manager -> SDK tools and
uncheck “Hide Obsolete Packages”
Refer the image
after that check the mentioned package and install it –
C:\Users..\AppData\Local\Android\Sdk\tools\bin is created or not.
After creating project
Go to Tools
AVD manager
Your virtual device -> Create virtual device
Select Hardware :- Nexus 5x (Resolution)
Next
Check the latest or download latest one (OS)
Next
As it is default settings
Launch Virtual device
network adapter ipv4 settings or proxy.. I checked that, then it solved.

How to install TFS 2013

I'm new to TFS on Visual Studio 2012 and I found the TFS 2013 Express edition to install. The thing is my friend and I are working on a project and we wanted to sync our version to either of us computer. Currently, we don't have a server to say but is it possible to use one of our computers as a server and install TFS on it and sync our projects? Does it require Internet connectivity whenever we want to sync? Can we use local area connection to do the sync? Do we need TFS to be installed on both of our computers?
A link to installation guideline would also be helpful.
Thanks
This is the guide you need to plan your Team Foundation Server installation:
http://www.microsoft.com/en-us/download/details.aspx?id=29035
TFS works perfectly well over a LAN. At the end of the day it's just a HTTP server, so as long as either you and your friend are on the same network, or if not, the necessary ports are open on the router, he can connect fine via the internet. Doesn't matter which one of you hosts it.
You do not need TFS on both computers, Visual Studio will happily connect to it once you provide the details (Access from the Team Menu, and Team Explorer).

"Check update" is not working in android studio

I have tried to "check update" in android studio
Help>Check for Updates
but it says
Connection failed. Please check your network connection and try again
But my Internet is working fine. .I've also tried to switch off my firewall. Is this bug of google service?
Update : Whenever updates | installations are failed, start the android studio as administrator.
Old Answer:
This is possibly a bug of Android Studio.
The following steps may help to fix this issue:
Open configuration
Select Settings
Select HTTP Proxy
Set to use no proxy
Restart Andriod studio
start the android studio as administrator. that helps me in android studio whenever updates/installations are failed.
Maybe u can try: Settings -> System settings -> HTTP Proxy -> auto-detect proxy settings.
I had the same problem. To fix I had to manually download a newer version from https://developer.android.com/studio/.
I'm currently running Android Studio 3.2.1 and it updates fine.
Also, in Preferences > Appearance & Behavior > System Settings > HTTP Proxy make sure that Auto-detect proxy settings is checked.
Check Screenshot
It doesn't seem to be a bug. I can confirm that the update worked perfectly fine on my home network. When on my office network, trying to update gives a connection error.
Must have something to do with the firewall...or some service that's not Checked to handle connections based on domain/home/public policies.
I tried no proxy option at both office and home network.
At home, "Check Update" works fine, but getting the error you mentioned with office network.
To avoid this error, you need to provide the proxy details from your office IT administrator.
It may be an also problem for VPN connected users. Try to disconnect and check for updates it will work. It worked for me

Resources