Android 同一设备上的两种应用程序

Android 同一设备上的两种应用程序,android,gradle,google-play,apk,Android,Gradle,Google Play,Apk,我使用Google Play开发者控制台创建了两个独立的应用程序: ID为com.myname.app的“MyApp”(用于prodflavor) ID为com.myname.appStage的“MyApp-Stage”(用于Stageflavor) 我使用gradle中的task将这些风格部署到相应的测试版通道 当我尝试在同一台设备上安装这两种口味时,Google Play会给我错误:-505。如果卸载第一个安装的版本,则可以成功安装第二个版本 正如我所看到的,这应该足够了 你知道怎么了吗

我使用Google Play开发者控制台创建了两个独立的应用程序:

  • ID为
    com.myname.app的“MyApp”(用于
    prod
    flavor)
  • ID为
    com.myname.appStage的“MyApp-Stage”(用于
    Stage
    flavor)
我使用gradle中的task将这些风格部署到相应的测试版通道

当我尝试在同一台设备上安装这两种口味时,Google Play会给我
错误:-505
。如果卸载第一个安装的版本,则可以成功安装第二个版本

正如我所看到的,这应该足够了

你知道怎么了吗

这是我的gradle脚本片段:

def getGoogleApiJsonFile() {
    (...)
}
android {
    (...)

    defaultConfig {
        applicationId "com.myname"
        (...)
    }
    buildTypes {
        release {
            (...)
            signingConfig signingConfigs.release
        }
    }
    productFlavors {
        prod {
            applicationIdSuffix '.app'
        }
        stage {
            applicationIdSuffix '.appStage'
        }
        dev {
            applicationIdSuffix '.appDevelop'
            (...)
        }
    }
    play {
        jsonFile = getGoogleApiJsonFile()
        track = 'beta'
    }
    (...)
}
以下是AndroidManifest.xml的一些片段:

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

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <uses-feature android:name="android.hardware.camera"
        android:required="true" />

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:networkSecurityConfig="@xml/network_security_config">

        <activity
            android:name=".login.LoginActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        (... more activities here ...)
        <provider
            android:authorities="com.myname.fileprovider"
            android:name="android.support.v4.content.FileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_provider_paths"
                />
        </provider>

        (... meta-data for io.fabric.ApiKey here...)

    </application>

</manifest>

(…这里有更多活动…)
(…io.fabric.ApiKey的元数据在此…)

由于您的应用程序中有内容提供商,您需要遵循

而不是链接。请在此处提供实际有用的内容。