开发者

Problem launching a MapActivity

开发者 https://www.devze.com 2023-01-09 04:19 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消