エミュレータでアプリケーションをテストしようとしていますが、うまくいきません。ただし、私の電話では問題なく動作します。バージョン 4.0.3 の Samsung Galaxy S2 を使用しています。これで動作するエミュレーターを作成するにはどうすればよいですか?
これらはエラーで、ここにペーストビンにありますhttp://pastebin.com/PR65kGxg :
03-05 15:03:16.777: W/Trace(856): Unexpected value from nativeGetEnabledTags: 0
03-05 15:03:16.967: W/Trace(856): Unexpected value from nativeGetEnabledTags: 0
03-05 15:03:16.967: W/Trace(856): Unexpected value from nativeGetEnabledTags: 0
03-05 15:03:17.387: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.427: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.467: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.497: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.527: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.887: W/GooglePlayServicesUtil(856): Google Play services out of date. Requires 2012100 but found 1015
03-05 15:03:17.887: D/AndroidRuntime(856): Shutting down VM
03-05 15:03:17.897: W/dalvikvm(856): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
03-05 15:03:17.917: E/AndroidRuntime(856): FATAL EXCEPTION: main
03-05 15:03:17.917: E/AndroidRuntime(856): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.neatspots/com.example.neatspots.MainActivity}: java.lang.NullPointerException
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread.access$600(ActivityThread.java:141)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.os.Handler.dispatchMessage(Handler.java:99)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.os.Looper.loop(Looper.java:137)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread.main(ActivityThread.java:5039)
03-05 15:03:17.917: E/AndroidRuntime(856): at java.lang.reflect.Method.invokeNative(Native Method)
03-05 15:03:17.917: E/AndroidRuntime(856): at java.lang.reflect.Method.invoke(Method.java:511)
03-05 15:03:17.917: E/AndroidRuntime(856): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-05 15:03:17.917: E/AndroidRuntime(856): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-05 15:03:17.917: E/AndroidRuntime(856): at dalvik.system.NativeStart.main(Native Method)
03-05 15:03:17.917: E/AndroidRuntime(856): Caused by: java.lang.NullPointerException
03-05 15:03:17.917: E/AndroidRuntime(856): at com.example.neatspots.MainActivity.setMapDefaults(MainActivity.java:89)
03-05 15:03:17.917: E/AndroidRuntime(856): at com.example.neatspots.MainActivity.onCreate(MainActivity.java:73)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.Activity.performCreate(Activity.java:5104)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
03-05 15:03:17.917: E/AndroidRuntime(856): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
03-05 15:03:17.917: E/AndroidRuntime(856): ... 11 more
03-05 15:03:18.187: D/dalvikvm(856): GC_CONCURRENT freed 244K, 13% free 2530K/2892K, paused 8ms+71ms, total 260ms
03-05 15:03:37.127: I/Process(856): Sending signal. PID: 856 SIG: 9
これは 89 行目です。
public void setMapDefaults()
{
map.setMapType(GoogleMap.MAP_TYPE_NORMAL); //line 89
map.setMyLocationEnabled(true);
}