开发者

Cannot run the Map Example

I'm trying to run the google maps

example but it keep giving me in the con开发者_运维百科sole:

"WARNING: Application does not specify an API level requirement!"  
"Device API version is 7 (Android 2.1)"

The application never starts, instead, it shows that frame with:

"The application (...) has stopped unexpectedly..."

Can Anyone point what might be the the problem?

Thanks


I agree with Jay. That warning is not the source of your error. However, you do want to take care of that warning.

In general, you should build your apps to work on the lowest version of the API possible that supports everything you need (I don't go below 1.5 since 0.1% of current devices out there are that old). However, a large chunk still use 1.5. By using API version 2.1, you are severely restricting the devices you will run on. However, if you really need that version you should specify it as a minimum. This will prevent people who have earlier versions of the SDK from downloading your app. In your manifest you want:

<uses-sdk android:minSdkVersion="7" />.

For more info, reference this article in the developers guide.


Open up the LogCat view and you should see more details on the error. I don't think your Warning is the cause of the application not starting. The warning just says that you have not specified the minimum sdk version in your AndroidManifest.xml. It is a warning, not an error. This is good practice, but should not cause the app to crash if you don't do it.

Edit:
If nothing is in LogCat, you might consider running the app through the debugger and see if any issues show up there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜