简体   繁体   中英

Multiple APKS installed of the same app

I'm not entirely sure how or why this is happening, but when I install my app, There are 2 apks that are installed. They have the same name and they have the same icon. One (top right, circled in red) force closes and the other (bottom left, circled in yellow) works just fine. But I dont want 2, only 1. Below is my manifest as Im sure that is where the issue is happening.

EDIT: I believe it has something to do with the servicestarter activity but I'm not sure what.

在此处输入图片说明

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

    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

    <application tools:replace="android:icon , android:theme"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
        <activity
            android:name=".ServiceStarter">
            <intent-filter>
                <action android:name="android.intent.action.ASSIST"></action>
                <action android:name="android.intent.action.MAIN"></action>
                <category android:name="android.intent.category.DEFAULT"></category>
                <category android:name="android.intent.category.LAUNCHER"></category>
            </intent-filter>
        </activity>
        <activity android:name=".HomeActivity"></activity>
        <service android:name=".Servers.SearchManager"></service>
    </application>

</manifest>

Do this in your manifest file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          package="bladebeat.pro.swipeup"
          android:versionCode="1"
          android:versionName="1.0" >

Android Studio builds two applications for the same project simultaenously

This was the problem. It actually had nothing to do with my Manifest and everything to do with my dependencies manifest. Problem solved though it should not have happened in the first place.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM