android emulator not working?
I develop mostly for iPhone and have started very recently with Android.
Tried the hello world, but when hit run the emulator just shows a black screen with an Android logo shining.
package com.hyper.tuti;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class TutiActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText("Hello, Android开发者_如何学Python");
setContentView(tv);
}
}
why is my simulator not working??
Yeah I've had emulator boot times of 5-10 minutes initially.
Hint
When you edit your AVD, there is an option to take a snapshot. What this does is when you close your AVD, it takes a snapshot and opens that next time, bypassing boot.
Edit 1/9/2014
I have recently gotten back into Android development, and I now use Genymotion to run my emulators. It is based off of VirtualBox - it runs incredibly fast. I have not tried the Android Emulator in years so I cannot say whether or not it is any faster. I know my emulators start up almost instantly now and are not slow and buggy like before.
give it time... it takes a WHILE to boot up! (seriously)
Haha I had the same problem first time I used the emulator too. But yes it just takes alot of time to boot it up, especially if you're booting it up for Android 3.0+ Honeycomb(platform 11+) wich in effect is the tablet platform.
Use Android 2.3 Gingerbread or Android 2.2 Froyo if you want your emulator to look like an android phone.
Configure your AVD settings to use platform version 10 or 8.
精彩评论