Android studio generating two apps the same way

Asked

Viewed 903 times

5

I developed an apk, but from the end of the project here he was always emulating two identical applications on my phone, same functions, icons. The difference between one and the other is that one has the splash and the other does not. Then when I managed the APK, I installed it on mobile and appeared the two apps. In the uninstallation I by selecting an apk to uninstall the other one is also uninstalled. Someone has been through this?

<?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="ANDROID.PERMISSION.CALL_PHONE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>


<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.MyTheme">


    <activity
        android:name=".MainActivity"
        android:label="WF Coleta">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

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

    <activity
        android:name=".SecondActivity"
        android:label="@string/title_activity_second"></activity>


    <activity
        android:name=".CarActivity"
        android:label="@string/title_activity_car"></activity>

</application>

  • tried to install the finished apk on another device?

  • Yes, the same thing happens

  • is expensive, can be a bug of Android-Studio. try to uninstall Android-Studio and re-install, or compile the project on another machine.

  • I have already turned on another machine.. and nothing =[

  • nothing that friend? did not compile, did not install, same problem? what happened?

  • try to remove your "end of the project" to see if the problem continues, if it continues, post the code here for an analysis.

  • Compiled, but appears the same apks

Show 2 more comments

1 answer

7


Change your Manifest

<activity
        android:name=".Splash"
        android:label="Splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

    <activity android:name=".MainActivity"
              android:label="WF Projetos">
    </activity>

The project can only have one action.MAIN and category.LAUNCHER.

  • 1

    It worked Igor, I’m obsessed man

Browser other questions tagged

You are not signed in. Login or sign up in order to post.