为什么应用程序签名更改在Android的类路径之后改变?应用程序、路径、Android

2023-09-13 01:36:56 作者:壞孩籽↓

我有支成三个不同的应用程序, APP-1 APP-2 和Android项目 APP-3 ,适用一些自定义。目前有很多code重复,使得维护噩梦:做变化的一个分支,然后合并其他两个

I have an Android project that branched into three different applications, app-1, app-2 and app-3, that apply some customizations. Currently there is a lot of code duplication, making maintenance a nightmare: do the changes in one of the branches, and then merge the other two.

所以我们创建了一个库项目,命名为应用核,该因素了大部分的重复code。到目前为止好。

So we create a library project, named app-core, that factors out most of the duplicated code. So far so good.

当我启动该到哪里申请已经被加载(重构之前)仿真器,我得到这个异​​常:

When I launch this into an emulator where the application was already loaded (before the refactoring), I get this exception:

重新安装,由于不同的应用程序签名失败。

有一个不同的签名?但我只是增加了一个行的.classpath 链接到应用核 Java项目!

A different signature? But I just added a line in the .classpath to link to the app-core Java project!

主要问题是:现有的用户将被这个困扰过

The main question is: are the existing users going to be bothered by this too?

和侧面的问题:为什么它是一个不同的签名

And the side question: Why is it a different signature?

推荐答案

数字签名是由存在的签署应用程序的机器上的签名密钥驱动。如果开发人员A使用标准的调试键编译一个应用程序,并在模拟器安装它,然后尝试安装该应用程序的其他一些变化 - 一个具有生产密钥签名,其中一个开发人员B的调试键等签署 - 在同样的模拟器,你就会得到这个错误。

The digital signature is driven by a signing key that exists on the machine that signs the app. If Developer A compiles an app using the standard debug key and installs it in an emulator, then tries installing some other variation of the app -- one signed with a production key, one signed with Developer B's debug key, etc. -- in the same emulator, you will get that error.

主要问题是:现有的   用户会被这个困扰   呢?

The main question is: are the existing users going to be bothered by this too?

你有,你使用你现有的用户使用该应用程序的版本制作的签名密钥?如果是的话,那么就应该没有问题。如果没有,你搞砸了。

Do you have the production signing key that you used for the version of the app your existing users are using? If yes, then there should be no problem. If no, you're screwed.