为什么我在 avd 应用程序菜单中看不到我的应用程序?
我的应用程序成功安装在我的 AVD 上,我可以通过在应用程序管理器中查看它来确认它已安装,但我永远无法访问它,因为我无法在应用程序菜单中看到它
在控制台中我总是收到消息
[2011-12-27 10:39:28 - WhosurSensei] 未找到启动器活动!
[2011-12-27 10:39:28 - WhosurSensei] 此次发布将仅同步 设备上的应用程序包!
我的打开 java 页面
package com.thepackage.WhosurSensei;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class WhosurSenseiActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button Button1 = (Button) findViewById(R.id.firstpagebutton);
Button1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent(WhosurSenseiActivity.this, MainMenu.class));
}
});
}
@Override
protected void onPause() {
super.onPause();
}
}
我的 androidmanifest 页面
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="@drawable/splash"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".WhosurSenseiActivity" >
<intent-filter >
<action android:name="com.thepackage.WhosurSensei.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".MainMenu" >
</activity>
</application>
</manifest>
My app successfully installs on my AVD, I can confirm it was installed by seeing it in the app manager, but I can never access it because I can not see it in the app menu
In the console I always get the messages
[2011-12-27 10:39:28 - WhosurSensei] No Launcher activity found!
[2011-12-27 10:39:28 - WhosurSensei] The launch will only sync the
application package on the device!
my opening java page
package com.thepackage.WhosurSensei;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class WhosurSenseiActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button Button1 = (Button) findViewById(R.id.firstpagebutton);
Button1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent(WhosurSenseiActivity.this, MainMenu.class));
}
});
}
@Override
protected void onPause() {
super.onPause();
}
}
my androidmanifest page
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="@drawable/splash"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".WhosurSenseiActivity" >
<intent-filter >
<action android:name="com.thepackage.WhosurSensei.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".MainMenu" >
</activity>
</application>
</manifest>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,我正在阅读的教程告诉我错误,我需要在清单中添加此内容:
Apparently the tutorial I was reading told me wrong and I needed this in the manifest: