Trouble Getting Started

I have some knowledge of coding, but have never worked with Android Studio.

I am currently having issues with the Android Studio emulator. Sometimes when I run the app that you start with that only has the "Hello World" in the middle of the screen, it works fine. Other times, the emulator phone screen flashes quickly until it goes completely black. Other times, there is an error and the app won't even start.

I followed a very simple tutorial online and created an app that just has a button in the middle of the screen. When I run this app, nothing shows up on the app's screen. I have tried constraining the button's position, and the app seems to be launching in the emulator, but the app's screen is completely blank.

With my basic coding background, all I want to do is to be able to get the emulator working, and then I can play around and learn the language after that.

Can anybody help me?

Posted Jan 28, 2018, 9:51 PM UTC

26
Chknbone•

Honestly, I would not worry about the emulator. I hardly ever use it. I hook a android phone via USB for testing my apps.

Do you have a repo somewhere? I'd clone it and see if it runs for me.

3
FroViceOP•

Gotcha. Emulator seems to be working now, but ill keep that in mind, thanks.

1
Lightdm123•

Two things: the language is Java and I am not sure whether Android studio is the right way to learn Java (at least it is not the way I did).
Second: you could try to not click "run" with the green trial how but the one with a little bug next to it (if you are accessing via the drop down Menü Tel below, via the panel at the top right two to the right of the normal button). This will start your app with a debugger attached to it. This means that it will not just run and stop, but show you why it didn't start.

2
FroViceOP•

Thanks for the response. I used to know java but its just been a few years since ive touched it, so I think Ill be ok with Studio.

Thanks for the tip about the debugger, ill give that a shot. I reinstalled the emulators and made a new app and it seems to be working for now. Not sure what I did differently.

1
bfpires•

Run on a device. If you really need emulator, start it before launching app. It will take 10 minutes or more to start, when it is ready, run your app.

1
JKaps9•

10 minutes?!? You need a new PC dude.

1