No internet access in Android emulator - android

I am not able to access internet in my emulator. It doesn't even connect to google on emulator browser. I have already checked Settings. Data Enabled checkbox is checked.
I referred to a few SO questions before posting the question.
As this answer suggests, I don't have wifi enabled. So that doesn't seem to be a problem.
As another answer in the same question suggests, I tried giving it in Run configurations, but still nothing is changed.
If someone can give any idea, that will help me a lot.
Note: On my emulator's home screen, 3G appears, but its with grey lines. I think those lines should be white. I might be wrong on this.

add GSM Modem Support to your emulator.
open AVD manager -> your emulator -> Edit.-> Hardware->New->GSM Modem Support.

You should check for http proxy settings in Tools of android sdk Manager in Eclipse.

Related

How can I run/debug my android app on my device via USB from my mac?

I'm following along with the tutorial provided by the Android Developers official site and using the help files in Android Studio, but I'm finding out of date screenshots and feeling very confused and a little frustrated.
I have a Pixel 2 connected via usb.
I've enabled developer mode on the device.
I've got it not sleeping when connected via USB.
I've enabled USB debugging in the Developer Options on the phone.
...I just need to figure out how to get my Mac to see it via Android Studio.
The tutorial alludes to a configuration screen that I don't see in studio. I see something similar but the device drop down is disabled.
Hit the sync button,
Wait for downloads(don't stop the hidden downloads)
Restart if necessary, wait for the first invocation to complete work.
Then enjoy your first app.
Happy coding :)
answer: hit the sync button (elephant/mouse looking icon with a diagonal arrow), wait for downloads, don't stop the hidden downloads, then restart if necessary, wait for first invocation to complete, ...then it will (hopefully) work.

Selected Device Incompatible - Android Studio

I have fixed this problem before but I can't now and I need a permanent fix. Everything has been going fine in Android Studio when it comes to testing my app. I now run into the problem "The selected device is incompatible." when I go to run the app. I'd like to know how I can keep it from reading my phone's API as 1 rather than changing my minSDK to cater to this problem, if possible.
EDIT: Literally just found a fix, not sure if it is permanent. I just restored my defaults in Development Options, turned USB Debugging off and on again and that did the trick.
All I had to do was turn off USB debugging, then turn it back on and it worked immediately. I didn't have to reboot or change any other settings.
Not sure if this helps. I had a similar issue using my MotoG 2nd generation with Android Studio on Ubuntu. I switched the settings as how my phone was connected from MTP to PTP. That worked for me.
I had a very similar issue,
Usually whenever I connect the android device for usb debugging, the device will prompt me asking for the permission from to access from the development PC
In my case, for some reason, I didnt get this prompt and hence, I got this error. I have turned off developer options & USB debugging, turned on again. Then, I got the prompt and the issue is solved

Genymotion didn't get an ip address from virtual box

I've installed genymotion about 2 days ago and I've been facing the same problem every time I tried to start a device.
After I downloaded a device in genymotion (Nexus S - 4.2.2 - API 17 - 480*800) I launched it.
Then after a box poped up telling me I have to wait, I got this error:
The virtual terminal genymotion didn't get an ip address. For an
unknown reason the virtualbox's dhcp servor didn't assign an ip adress
to the virtual terminal. Please launch virtualbox to find a solution
to this problem
I can't figure out how to solve this problem.
I looked up on many websites but it seems as if I'm the only one to get this error.
I'm on Windows XP-SP3.
My graphic card is a radeon HD 3600 driver up to date.
Does anyone have any idea?
Thank you.
Try downgrading to Virtual Box 4.2.18, if you are using 4.3.X.
I had a similar situation to yours.
I was using Genymotion 1.3.0 on Win7, with latest Virtual Box 4.3.2. Genymotion broke down after a computer shutdown, and never worked again.
I kinda stumbled onto this solution. After downgrading, Genymotion survived one shutdown now.
All Android VMs used to work for me under Genymotion 2.0.0. with default RAM and CPU settings and VirtualBox 4.3.2 (on ubuntu 13.10). Upgrading to 2.0.1 made them stop working and give the error you mentioned.
I tried various fixes as I described here: https://stackoverflow.com/a/20018833/2527118, but in summary what fixed my problem was to delete VM and recreate it (same source and settings) in GenyMotion. You might want to try the other fixes (less destructive) before doing that.
Andrei
I try to solve this for 6 days and in the end, I realized I needed to uninstall then re install virtual box so I can get their default settings then change my network settings as explained better in this link. It explains in depth how the ip address works with the virtual machine, and how the chances of it trying to use a static ip address are very likely.
https://askubuntu.com/questions/232876/how-to-let-a-virtualbox-guest-running-windows-access-the-internet
let your network settings be handled by themselves if you've tried everything, maybe this will allow your VM to use its own IP address and stop trying to use your Physical devices IP address.
Hope this helps.
I had the problem with the IP error, too. As I have a real Samsung Galaxy S2, I downloaded the vitual version 2.3.7 Api 10 in Genimotion. All IP settings were correct, the sequence of starting the programms didn`t matter. The IP error reoccured :( .
Finaly, I tried to use another virtual device: Custom Tablet 5.1.0 API 22. It loaded and worked, but very slow. WhatsApp got stuck on the installation process :( . As this article on Heisse.de recomended to use the Nexus S 4.1.1 for WhatsApp, I tried this third vitual device and everything worked fine :) !
http://www.heise.de/download/special-whatsapp-auf-pc-mac-und-linux-nutzen-152241.html?hg=1&hgi=3&hgf=false
I know this post is old. But my answer is just for someone who google this issue and hopefully it may help them since I also stuck on it for a long time and fix it fortunately.
This is my way to fix the problem:
First of all, I had configured all the settings what the people said on the internet like the following link: Not able to start Genymotion device
I found that it's still failed to run the VM on GenyMotion.
So I tried to remove all the existing Host-only Network like vboxnet0 or vboxnet1(According to the official website of GenyMotion, it said that it will regenerate a new one when there is no any vboxnet)
Finally, I tried to restart the VM on GenyMotion, suddenly I run it successfully without any errors message
Notes: I disabled the adaptor 2, 3 and 4 before I was gonna tried the above actions.
As other have said, you have to install Virtual Box. In my case (using Ubuntu 16.04), I had to enable the 'virtualization' in Bios. Once that was setup, I was able to set the 'OS' to use 'Ubuntu 64bit' in 'settings/general' tab.
Other possible solutions include, configuring Virtual Box further, including reducing the RAM usage (in settings), in 'Network' tab in settings, under 'advanced' options, disabling the 'cable connected' option & setting 'Promiscuous mode' to 'allow all'.
IN case a Genymotion device cannot obtain an IP address any more, you might want to check the configuration in the VM-Ware settings: I got this fixed by removing the "promiscous mode" from the network adapter 1 settings - see screenshot.
The promiscous setting may lead to difficulties in obtaining an IP address in the genymotion simulator

Network Connectivity Error In Android Emulator

I know that there are several threads posted about this issue, however I believe my problem to be a bit different:
I have installed Android emulator on my desktop.
When i try to browse internet via the emulator, it works perfect.
But the problem is the apps that i have installed in the emulator are not able to access the internet
i installed whatsapp successfully, the registration screen loads properly, then i entered my mobile number and pressed OK button. I keep getting the following error
Unable to connect. Please check that you are connected to the internet
and try again. Please reboot your phone if your connection problem
persists.
Its very annoying that i have been Googleing the error for weeks now and still havent reached a solution to the problem
I tried bluestacks .. i also reinstalled it as well as emulator several times... it did not help...
1000 thanks to person that helps me solve this issue..:D
Re install emulator
Delete and create the emulator again
Check whether machine is connected to online
Check Android manifest to see whether application has access to internet
These are some common issues.
From this answer:
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
inside your AndroidManifest.xml
Add 8.8.8.8
on a Mac: System Preferences > Network > DNS
(or equivalent for Windows)
As described here: Android emulator not able to access the internet
I have installed youwave on my laptop at home and downloaded whatsapp, then registered in whatsapp. It worked perfectly without any problem.
Then I tried the same at office and it did not work. But can access the internet thru the browser. I believe that the reason is that at office I'm behind a proxy and not sure if whatsapp uses certain protocols not allowed by office proxy.
ok... i have the same problem.
but i know, what is the best solution till now for bluestacks connection problem.
you have to install proxycap software.
make new proxy rules for bluestacks.
in c/program*86/bluestacks/HD-network.exe
this is the file that you have to make rule for.
whatsapp will work and other apps too.
but still u can't download data using bluestacks.
but yes if you have bluetooth then there is no problem. connect ur phone having internet connection.
and your rule's proxy will allow you to download data. the good thing is that 95% data is downloaded through your wired network(LAN). bluetooth connection of phone just helps you to maintain the server side connected...and now go to google store or wtever u want to download. you are good to go.
and just activate a small data pack on your phone.... thanxx.. hope that would help
one solution can be to disable the gps, just go to advance conf. then to location and turn that off. that worked for me at least.

Eclipse won't recognize G-tablet

I am trying to view a sample app on a real device (a ViewSonic G-tablet), but the device won't display in the "Choose a running Android device" area. The virtual devices show, but no real devices show (there is only one plugged in, the G-tablet). Some other information...
I am using a Mac with Eclipse SDK 3.7.1 w/Android
App is noted as debuggable in manifest file (android:debuggable="true")
G-Tablet is set to allow debugging
Device selection is set to manual in SDK
I CAN view files on G-Tablet using Finder
I have reviewed Android developer docs
I have searched a lot online for a fix, without success
Please also note...
There is NO option on G-tablet to allow "unknown sources". However, I have downloaded apps outside the customary channels (e.g. Firefox from the Firefox site) and it works fine.
I do NOT want to do anything to the G-tablet to void the warranty.
I have already checked for/installed updates using the Android SDK Manager.
The fixes I was able to find on StackOverflow related to this problem did not work for me. I am thinking the problem may be device specific. One fix discussed getting a driver for the device, but I couldn't find one.
Can anyone please help me figure out how to get the SDK to recognize my device? I'd appreciate any insight on this.
Can you export the app as an .apk and run that on your G-tablet?
also is the android:minSdkVersion set to a value lower than your G-tablet's version?
Found the answer after trying a zillion things. All that needed to be done to fix the problem was turn to OFF 'USB debugging' and then turn it right back on. I found the idea on this page... http://www.mobileread.mobi/forums/showthread.php?t=156247 . Hope that might save someone else hours of time.

Categories

Resources