Android studio AVD internet access - android-studio

I am using Android studio 3.0.1 and that is working really very fine. I have upto date SDK version and I have upto date gradle version.
Everything seems to be perfect now. But I am now facing a problem and I have no idea why it is occurring.
Problem:
Whenever I try to access webservices my emulator/AVD never access that. Also I am unable to access the internet using emulator browser. Even it is unable to open the Google.com page.
I have searched this problem but non of them is working for me. I have checked the Ip configrations and that is totally fine. I am not using any specific DNS settings and I am not using any special VPN network. My network adapter is just fine. I am using Windows 7
Please help me if anyone of you having solution of this problem. Thanks in advance.

Well there are couple of cases i want to discuss. And that is totally what I dig out after trying for hours.
I have same Issue. and for this I have seen that there was nothing wrong with the AVD i was creating again and again. But I was using Windows 10 and using android studio over it.
The problem was the virtual networks. I got them created for the Blue stacks and GeneyMotion emulator. They sets the IP and the DNS them self for virtual network
SO if you are having virtual network set their IP to defaults. OR disable them at all. Also disable other networks except the one you are using.
and after doing this all. Create the new AVD and check if that starts working.

Related

Android Studio unable to fetch packages from some default SDK update sites

I just installed Android Studio 1.5.1 on a Windows 7 64bit machine. I went to the built in SDK manager and I see that Android Studio is unable to fetch from some of the default sources.
Now I have tried some solutions that I saw online such as ticking the Force https:// sources to be fetched using http://, using a proxy, etc. I tried them and it still doesn't fetch from the 5 sources above. I have already disabled my firewall and anti virus for what it's worth.
I also tried using the Standalone SDK manager and still wasn't able to fetch successfully from those 5 sources. Here's the log:
I find it strange that I'm able fetch from the other default sources when ALL of the default sources are from https://dl.google.com/android/.... anyway. I also tried opening the URLs on my browser and I can see the page load. I also tried pinging via cmd and I get replies from it.
Is the problem on Google's server side? Anyone else experiencing this currently? I did not face this issue on an installation I made 3 weeks ago...
So I tried to reload the sources again a day after and it now successfully retrieves the packages from the URL. I guess the problem was on Google's side after all. Hope this helps anyone who might encounter this issue in the future.

Not able to connect to Internet from Visual Studio Emulator for Android

I just installed VS 2015 RC and opened up the VS emulator for Android. I am not able to connect to internet from this emulator. I went to settings -> WiFi and could see its turned on, but not showing as connected to any network.
Upon turning off the wifi and turning it on, I could see the status as "Connecting".
How do I configure this emulator to access internet ?
I had to just disable the VirtualBox Host-Only Network adapter, which Genymotion emulators under VirtualBox used (Control Panel - Network and Internet - Network Connections on Windows 10), then restart the emulator and it works like a charm.
Greg
If you use Wifi to connect to internet. Just go to Run and search Hyper-v manager so run it. Select your emulator from virtual machines section right clicking on it go to settings . You see some adapters . we need seconed item external network.
so change it to your Wifi adapter. go to your emulator and google Iman Mohadesi. it works. just it.
Put away your shotguns folks. The key to solving this is a complete understanding of the problem. The VS Android Emulator is not configured out of the box with an external network connection. (Why? Why? Why?). The only network adaptor it has (Window Phone Emulator Internal Switch) is (as it name says) internal, that is not connected to the internet. It is only used (apparently) for communicating with the host.
So to have internet connection we need to add another virtual adaptor and connect it on the host system to the internet.
See this blog post to add and configure adaptor: http://blog.tpcware.com/2017/03/visual-studio-2017-android-emulation/
Overview:
In Hyper-V Manager add a new Virtual Switch. Name it External. See that it is connected to your real network connection.
In the virtual machine settings for the Android emulator, add a new network adaptor (emulator must be stopped to do this). Select the newly created external virtual switch.
Start emulator and open browser. Voila! You now have internet access.
So please disregard all the advice about rebooting, repairing, re-installing, etc. This is all a complete waste of time. I am astonished that some folks report this fixes the internet connectivity.
One last thing. The blog post says that this approach does not work if you network adapter is wireless. It works find for me and I only have a wireless connection from my laptop.
This solved my issue. there must be an internal and external network with the external listed after the internal. Use Hyper-V manager to fix these up on all your VS Emulators VMS.
No internet connection for Visual Studio Android Emulator
I only use Hyper-V and for some reason, all my Android emulators failed to connect to internet. To resolve this, go to Hyper-V Manager -> Virtual Switch Manager (on the right side of the window) and remove the corresponding virtual switch, in my case the Wireless. Finally in Visual Studio, run the app with any of the emulators and wait till finish its re-install the virtual switch.
In my case, I had the wifi enabled instead of ethernet (The cable was accidentally unplugged). pluggin it back solved the problem.
this link enter link description here
saved my a lot of times. Hope this help for you.

Unable to access Android SDK add-on list

I'm new to Android programming. I was installing the Android studio and it got stuck at one point during installation showing the following message.
So, don't to how to proceed, I searched about it, but couldn't get explanation about this specific condition.
Can someone explain what to do next?
Screenshot:
Note: I'm using Windows 7, Installed JDK 7 before installing Android studio.
Update: I tried to click upon "Setup Proxy" and then just clicked ok without doing anything and it worked, don't know how, but it did.
Try that if any one face the same.
Add the following code to C:\Program Files\Android\Android Studio\bin\idea.properties
disable.android.first.run=true
Just open the file and press Ctrl+F and type run then you will find this run=false, change it to true.
1) click on set up proxy.
2) Select option Auto Detect proxy.
3) Click continue, it will work!!
All the best
I clicked Cancel at this screen and process of setup continued. I saw it on Linux after copying android studio folder from one PC to another. By the way, I started studio not connected to Internet cause I try to be able to work offline.
I just hit this same problem - I was on a VPN.
I tried setting a proxy with 'auto detect proxy settings' but it did not help.
Then I tried disconnecting from the VPN with no proxy set - this resolved the problem for me.
good luck.
You can set the right proxy to solve this problem.
Set proxy ->
Manule...
Https and port
Sometimes,if you use Shadowsocks on your macOS, maybe you will have the same problem.You can turn Shadowsocks off to deal with this problem.
I finally solved the problem by following the Steps:
Add the following code to "C:\Program Files\Android\Android Studio\bin\idea.properties"
Open idea.properties with notepad
Then, enter the code below anywhere on a new line in the file (see attached image)
Code :
disable.android.first.run=true
Save the file
Run the application
Clear your DNS if there is any dns server settings like google, comodo,
symantec etc.
Check your firewall settings if you are using tinywall, zonealarm etc.
If your computer and network connection doesn't have any dns settings and firewall; then check your internet connection maybe there is an update process to slowing down your internet speed. So if there is a process stop or wait for it. And try again. Good luck...
Yet another reason why this can happen is when your time and date settings are not synchronized correctly. I installed android studio inside a virtual machine linux guest that didn't properly synchronize the time with the windows host and as a consequence the above message occured even though my internet connection was working fine.

Windows phone 8.0 error 0x89371B01 when trying to deploy app

I cant find information on this error anywhere. I am connecting to a brand new lumia icon (AKA lumia 929). Dev account is registered. I have attempted:
reinstalling windows phone SDK
restarting phone
restarting computer
ensured the app runs on the emulators properly. the only required capability of this app is network. Capabilities have not been changed from the defaults since the project was created. none of the manifest xml files have been touched.
ensured phone software version is up to date
ensured apphub account is valid and active
ensured the windows phone developer registration tool worked, unregistered and re-registered the phone to make sure
restarting the "ip over usb" windows service thingy
changing the platform built target to ARM or AnyCpu (no difference, same error)
tried alternate deployment methods such as windows phone power tools (the xap deploy) and I get the same error when trying to connect (so I know it's not an issue with visual studio, nor is it an issue with the app code)
I can successfully deploy separate code to a separate WP7 device (so I know it's not an issue with the computer)
tried multiple usb ports
tried two separate laptops
tried visual studio 2013 and 2012
The behavior is this:
Connect the phone via usb and unlock it
Attempt to connect to phone via windows phone power tools OR deploy an app via visual studio
System hangs for about 90 seconds and seems to time out
Error appears
I am able to view the phone contents, name it and explore it on my laptop, but when it comes time to deploy something I am stuck.
Error message is simply: 0x89371B01
What does that mean? Has anyone else run into this?
Have you checked the device drivers on your Windows 8.1 machine? It could be a driver issue with your USB drivers on the computer.
I have also found that, once you get it connected, going into the Device Manager and deleting the device from there and forcing it to reload has helped me in the past.
Out of curiosity, try running "sfc /scannow" at a command prompt on the PC. It may require admin elevation. I've seen some bizarre behaviors due to dll problems in sxs in win 8.1, wondering if this could be caused by that kind of thing.
Couple of things to try:
Have you installed the GDR3 Emulators and tried running it on the 1080p emulator? It looks like the 929 is a 1920x1080 phone and will have the latest the latest updates installed. First place to check.
Based on this feedback in another stackoverflow question it looks like someone was having a similar issue and disabling Hyper-V resolved it for him. If you disable Hyper-V and it works, try re-enabling it and see if you still have the issue.
jmshapland had the correct answer for me, with the same issue. Disabling Hyper-V did the trick! No thanks to microsoft phone dev center forum posting on the issue..
http://social.msdn.microsoft.com/Forums/wpapps/en-US/24bd3e48-e7b4-4d00-8d69-193f49989ce0/0x89731b01-error-during-deploy-to-device?forum=wpdevelop
Looks like I'll be disabling Hyper-V to test on my device, and re-enabling to work in emulator mode:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
and
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
OK I was able to come up with a repeatable solution for the issue. Im HOPING that by posting this I dont tempt fate and have the phone not work again!
Here are the steps I did to resolve it (not sure if all of them are necessary):
On phone, disable wireless
Connect phone to laptop
Open device manager and click to show ALL HIDDEN DEVICES (including hidden devices is important)
Uninstall ALL phone-related devices (one in portable devices, several in USB
devices) anything that mentions lumia must go
Disconnect/reboot phone
Reboot laptop (there seems to be a process keeping the port open)
I had connectivity, then I lost it, then I re-gained it using these steps and it seems to be reliable for me (so far)

MonoTouch's Soft Debugger don't connect to App on iPhone - why?

I'm quite new on MonoTouch, so please forgive me my question in doubt... ;-)
I need help with the soft-debugger, because it's not connecting to the App on the device. While with iPhone Simulator everything is working as expected, the following happens when I start debugging against my device:
The is uploaded and installed to the device.
MonoDevelop comes up with a window saying the following: "Waiting for debugger to connect on 127.0.0.1:10000..." Please start the application on the device"
When starting the app on the device, the device vibrates indicating that the debugger is not connected....
In the settings of my App on the iPhone I have set the IP-Adress to my Mac's IP.
My iPhone is connected via WIFI to my network. I can ping my Mac from my iPhone and vice versa.
In several screenshots where the debugger was obviously working I saw that the debugger came up with the Mac's IP address and not the 127.0.0.1....
Do I have to configure my IP-address somewhere in MonoDevelop?
BTW: I'm using the latest version of MonoDevelop - it's 2.4.1
I have tried anything.... re-installing MonoDevelop, cleaning up the project several times, setting up a new project.... nothing...
Please, please help....
1.- Make sure you are connected the same wifi network both on device and computer
2.- Open monodevelop and your project and on top of the window select on the combobox "Debug|iPhone" (ScreenShot) setting and then clic on Run(menu)->Run Option (wait until it finishes to load your app on the device and DO NOT Open it yet)
3.- Get the ip address of your computer
4.- On the iDevice make sure that the application its closed then go to Settings -> (YourAppName) here you will be with the debug settings
5.- On Debugger Host setting you must put you computers ip address
6.- on MonoDevelop under Run(menu)->Debug you will be presented with the "Waitting for Debugger"
7.- Open you application and debbuger should connect now
Hope this helps
Alex
Alex,
many thanks for your replies! They were very helpful to me (especially point 5).
I have solved the problem by setting the Host IP in the ~/.config/MonoDevelop/MonoDevelopProperties.xml. That did it! :-)
Now I'm wondering where I do this setting in the MonoDevelop GUI... ;-)
Cheers,
Andreas

Resources