开发者

Running the Android emulator

I am trying to run the emulator and each time I tried it it gives me the same error message 'Application stopped unexpectedly' I tried sorting it by killing the adb process in the task manager. The log cat error says:

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

I do not开发者_开发知识库 know how this could be sorted, or if there is any other issue.

Please help, thanks!

Amrita


I guess the solution for your problem is:

In your manifest there should be something like this

<uses-sdk android:minSdkVersion="int" />

Now just change the number to the desired version number. Additionally you should also change the value of the target in the default.properties file.

AdnroidManifest.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.jaxx.progressbarexample"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".MainActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    **<uses-sdk android:minSdkVersion="9" />**

</manifest>


One more thing to remind,you specify the min sdk version in your AndroidManifest.xml file similar to what your emulator target sdk version which you specify while creating your AVD.or create a new AVD with a target sdk of your application

.

Running the Android emulator

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜