java - Android-使用 eclipse 安装到设备一次安装同一应用程序的两个实例-错误

标签 java android apk

Android-使用 eclipse 安装到设备一次安装同一应用程序的两个实例-错误

它在使用 Eclipse 安装后运行,但是当我触摸该图标时,它没有启动,它向我显示 Android 常见错误 syaing 意外停止!请帮助我??

这是我正在使用的 list ( Activity )

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.hunter99x"

      android:icon="@drawable/icon"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".main" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.NoTitleBar"
                  android:label="@string/app_name" android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

                <activity android:name=".origine" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.NoTitleBar"
                  android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.origine" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

                        <activity `enter code here`android:name=".Gameover" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.NoTitleBar"
                  android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

                                                <activity android:name=".LandingScreen" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.NoTitleBar"
                  android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-permission android:name="android.permission.VIBRATE"/>

</manifest>

最佳答案

我认为问题是因为你重复了

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

这适用于 2 项 Activity 。尝试删除它并仅声明 1 个 Activity 作为您的主要 Activity 。 Tjis 可以解决您的问题。

关于java - Android-使用 eclipse 安装到设备一次安装同一应用程序的两个实例-错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10083258/

相关文章:

android - AmazFit Bip watch - 心率

更改设备语言时更改了 Android APK 名称?

Android APK 在 google play 中不可见

java - 那么JavaFX中如何显示消息框呢?

Java getClass 返回不同的类

java - 使用 aerospike 进行集成测试?

android - 了解 Android 应用程序许可

android - 以编程方式强制关闭应用程序

java - json对象转换为java字符串

android - 反编译flutter release apk。在哪里可以找到源代码?