I cannot connect to the Internet on Android Emulator in Android Studio

This question is about Android Studio. I just learned basic Android through a course. So while I was messing around with a test application, I came across a code to connect to a website. For example. Facebook, Youtube.

I bind the code to the button correctly, but I will give you the code I was trying to create anyway.

public void browsefacebook (View v){
    Intent browseFb = new Intent(Intent.ACTION_VIEW,Uri.parse("https://www.facebook.com"));
            startActivity(browseFb);

      

So, this is basically the code I did. I chose the permissions correctly, but every time I click the button to connect to Facebook or YouTube. It falls on me. It says, "Sorry, TestOne has stopped." Now if you ask me if I added custom permissions, I added them. The only weird thing I noticed about the Android emulator is that the 3G sign in the notification bar has an X on it. So I guess that's the problem, I would really appreciate if anyone can help me solve the problem.

Thank!

+3


source to share


1 answer


Try clicking F8

in the emulator.



Source: 3G Connecting to Android Emulator

0


source







All Articles