当我为onMapLoaded添加回调时,我收到错误
这是我的班级:
GoogleMap map;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.casinos_karte);
map = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
if (map == null) {
Toast.makeText(
Casinos_Karte.this,
"Can't load map",
Toast.LENGTH_LONG).show();
this.finish();
return;
}
map.setIndoorEnabled(false);
map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
map.setMyLocationEnabled(true);
map.setOnMyLocationChangeListener(new OnMyLocationChangeListener() {
@Override
public void onMyLocationChange(Location arg0) {
// TODO Auto-generated method stub
}
});
map.setOnMapLoadedCallback(new OnMapLoadedCallback() {
@Override
public void onMapLoaded() {
// TODO Auto-generated method stub
}
});
}
这是错误:
11-05 19:40:17.772: E/AndroidRuntime(23862): FATAL EXCEPTION: main
11-05 19:40:17.772: E/AndroidRuntime(23862): Process: de.wolfsline.db.info, PID: 23862
11-05 19:40:17.772: E/AndroidRuntime(23862): java.lang.NoClassDefFoundError: de.wolfsline.db.info.casinos.Casinos_Karte
11-05 19:40:17.772: E/AndroidRuntime(23862): at de.wolfsline.db.info.casinos.Casinos_Auswahl$1.onClick(Casinos_Auswahl.java:65)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.view.View.performClick(View.java:4438)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.view.View$PerformClick.run(View.java:18422)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.os.Handler.handleCallback(Handler.java:733)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.os.Handler.dispatchMessage(Handler.java:95)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.os.Looper.loop(Looper.java:136)
11-05 19:40:17.772: E/AndroidRuntime(23862): at android.app.ActivityThread.main(ActivityThread.java:5001)
11-05 19:40:17.772: E/AndroidRuntime(23862): at java.lang.reflect.Method.invokeNative(Native Method)
11-05 19:40:17.772: E/AndroidRuntime(23862): at java.lang.reflect.Method.invoke(Method.java:515)
11-05 19:40:17.772: E/AndroidRuntime(23862): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
11-05 19:40:17.772: E/AndroidRuntime(23862): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
11-05 19:40:17.772: E/AndroidRuntime(23862): at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
您找不到课程例外检查您的图书馆。