gpt4 book ai didi

java - 为什么我在 avd 应用程序菜单中看不到我的应用程序?

转载 作者:行者123 更新时间:2023-12-01 15:37:37 25 4
gpt4 key购买 nike

我的应用程序已成功安装在我的 AVD 上,我可以通过在应用程序管理器中查看它来确认它已安装,但我永远无法访问它,因为我在应用程序菜单中看不到它

在控制台中我总是收到消息

[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!

我打开的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>

最佳答案

显然我正在阅读的教程告诉我错误,我需要在 list 中添加此内容:

<action android:name="android.intent.action.MAIN" />

关于java - 为什么我在 avd 应用程序菜单中看不到我的应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8639752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com