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

发布于 2024-12-22 23:38:46 字数 1724 浏览 1 评论 0原文

我的应用程序成功安装在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满意归宿 2024-12-29 23:38:46

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

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

Apparently the tutorial I was reading told me wrong and I needed this in the manifest:

<action android:name="android.intent.action.MAIN" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文