0

我目前正在开发使用本机工具(Anroid Studio、Java、Android SDK 等)开发的 Android 应用程序,以替换 Play 商店中已经可用且使用 Xamarin 开发的现有应用程序。

我正在尝试通过从 Play 商店安装当前版本来模拟应用程序的更新,然后在命令行中安装新版本:adb install -r myApp.apk

然后我收到此错误消息:

失败 [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE:包 com.myapp.package 试图更改用户 com.domain.param]

根据我的研究,以前的应用程序sharedUserId在清单中声明了 a ,我无法将其删除。因此,在我的新应用程序清单中,我添加了以下信息:

android:sharedUserId="com.domain.param"
android:sharedUserLabel="@string/sharedUserLabel"

值与旧应用程序相同。但我仍然收到错误消息。

我需要在清单中添加更多信息吗?我对这两个应用程序使用相同的密钥库签名。

编辑:我还声明了AuthenticatorService具有相同值的 an:

<service android:name="com.myapp.package.AuthenticatorService">
  <meta-data
    android:name="android.accounts.AccountAuthenticator"
    android:resource="@xml/authenticator"
  />

  <intent-filter>
    <action android:name="android.accounts.AccountAuthenticator" />
  </intent-filter>
</service>

任何的想法 ?

4

1 回答 1

0

和属性必须在标记中声明,android:sharedUserId而不是在...android:sharedUserLabel<manifest><application>

于 2019-01-07T13:09:01.393 回答