我是Android开发的新手,我想首先让该Hello World
应用程序运行。我正在使用Eclipse IDE和Android 4.0.3版本15 SDK。我从教程站点复制了所有内容,但是当我尝试在上运行应用程序时,出现virtual device
此错误:
[2012-02-01 11:31:23 - Android_test] Installation error: INSTALL_FAILED_OLDER_SDK
[2012-02-01 11:31:23 - Android_test] Please check logcat output for more details.
[2012-02-01 11:31:23 - Android_test] Launch canceled!
Here is my class in the com.maze.app
package:
package com.maze.app;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}
and the AndroidManifest.xml
:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maze.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="@string/app_name"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity android:name="HelloAndroid" android:launchMode="standard" android:enabled="true"></activity>
</application>
Here is the configuration of the Virtual Device
:
Name: AndroidVD
CPU/ABI: ARM(armeabi-v7a)
Path: path\to\avd
Target: Android 4.0.3(API level 15)
Skin: WVGA800
hw.lcd.density: 240
hw.cpu.model: cortex-a8
vm.heapSize: 48
hw.ramSize:512
What is the problem?
EDIT: The application is not running on the Virtual Device: Here is what I get on LogCat(some of the lines):
D/PackageManager(92): New package installed in /data/app/com.maze.app-2.apk
D/dalvikvm(92): GC_CONCURRENT freed 660K, 9% free 11935K/12999K, paused 18ms+72ms
I/ActivityManager(92): Force stopping package com.maze.app uid=10040
D/BackupManagerService(92): Received broadcast Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.maze.app flg=0x10000010 (has extras) }
V/BackupManagerService(92): updatePackageParticipantsLocked: com.maze.app
android:targetSdkVersion="@string/app_name"
is mentioned. is it a typo?