My app force closes when I try to launch the same MapActivity from the HelloGoogle开发者_如何学PythonMaps tutorial. I am launching it from my main activity which is just a list:
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
Intent i = new Intent(this, HelloGoogleMaps.class);
startActivity(i);
}
HelloGoogleMaps works fine by itself and the class is in my manifest. I tried tracing the problem with the debugger and it crashes somewhere when create my Intent. Any ideas?
Thanks.
Sorry, figured it out. I was pulling my hair out for a long time and then figure it out moments after I post this question.
I forgot to put
<uses-library android:name="com.google.android.maps" />
in my manifest.
精彩评论