我有一个非常简单的android项目.我尝试运行它时收到以下错误消息.模拟器正在运行但应用程序没有出现.我在网上找不到任何有用的信息.谁能帮我?
Warning: Activity not started, its current task has been brought to the front
Run Code Online (Sandbox Code Playgroud)
public class Profile extends Activity {
/*Button button1;
CheckBox check1, check2;
EditText text1;*/
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Run Code Online (Sandbox Code Playgroud)
<EditText android:text="@+id/EditText01" android:id="@+id/EditText01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:enabled="false"></
EditText><CheckBox android:text="@+id/CheckBox03" android:id="@+id/
CheckBox03" android:layout_width="fill_parent"
android:layout_height="wrap_content">
</CheckBox>
<CheckBox android:text="@+id/CheckBox02" android:id="@+id/CheckBox02"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</CheckBox>
<CheckBox android:text="@+id/CheckBox01" android:id="@+id/CheckBox01"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:checked="true">
</CheckBox>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.seiservices.blending"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<activity android:name=".Profile"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="8" />
</manifest>
Run Code Online (Sandbox Code Playgroud)
mre*_*elt 103
这不是错误消息,而是警告.系统试图告诉您的内容:设备上的应用程序与Eclipse中的应用程序相同.并且因为应用程序已经在设备上运行,系统会告诉您它不会杀死并重新启动它,而是将已经运行的应用程序的活动带到前台.这很正常.;-)
如果您编辑代码并运行它(因为应用程序被杀死,重新安装并启动)或者您在手机上终止您的进程(例如通过DDMS),警告将不会继续.
如果您在没有重新编译的情况下从eclipse运行应用程序(如果您没有更改代码则不会重新编译)它不会通过卸载安装过程,而是将应用程序推送到前面就像启动应用程序一样来自Home Launcher.这不是错误,而是"按预期工作".
问候