Android 由于应用程序签名不同,重新安装失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2887436/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Re-installation failed due to different application signatures
提问by Pentium10
I moved my Android project to a laptop and now I get this when I hit Debug. Sounds like this is a bug? This shouldn't happen via Eclipse as far as I know.
我将我的 Android 项目移到了笔记本电脑上,现在当我点击 Debug 时我得到了这个。听起来这是一个错误?据我所知,这不应该通过 Eclipse 发生。
Re-installation failed due to different application signatures.
The weirdest thing is this happened after I upgraded sdk/adt and Eclipse to support SDK 2.2It was working fine earlier, and now it doesn't, so it might be a bug.
最奇怪的是,这发生在我升级 sdk/adt 和 Eclipse 以支持 SDK 2.2 之后。之前工作正常,现在不行了,所以它可能是一个错误。
回答by Nikolay Ivanov
It happens because keystores on your laptop and original pc are different. it's called debug.keystrore
and located in %USER_HOME%/.android/
folder. TO be more specific it happens because eclipse tries to push apk with reinstall key. So you have two options
这是因为您的笔记本电脑和原始 PC 上的密钥库不同。它被称为 debug.keystrore 并位于%USER_HOME%/.android/
文件夹中。更具体地说,这是因为 eclipse 尝试使用重新安装密钥推送 apk。所以你有两个选择
- Share debug.keystore between various development pc's
- Manually uninstall your apk from device ( using adb )
- 在各种开发电脑之间共享 debug.keystore
- 从设备手动卸载您的 apk(使用 adb )
回答by Mohammed
I also got the same problem and fixed it. you should do the following to fix it,
我也遇到了同样的问题并修复了它。您应该执行以下操作来修复它,
Uninstall the application from your mobile if you load it already.
To uninstall goto settings->application->manage application.
- Run the application again and choose the mobile
如果您已经加载了该应用程序,请从您的手机卸载该应用程序。
卸载转到设置->应用程序->管理应用程序。
- 再次运行应用程序并选择手机
Hope this will help you
希望能帮到你
回答by DreamerNS
After you copy debug.keystore to your PC, you need to rebuild project on PC.
将 debug.keystore 复制到 PC 后,需要在 PC 上重建项目。
回答by Tom
I had the same issue using the Droid emulator. I solved it by uninstalling the package from the application settings in the emulator as you would a normal device. On the next run, it reinstalled and the error went away.
我在使用 Droid 模拟器时遇到了同样的问题。我通过像普通设备一样从模拟器中的应用程序设置中卸载包来解决它。在下一次运行时,它重新安装并且错误消失了。
回答by tara
I also had the same problem and fixed it by uninstalling the app and reinstall it again.
我也遇到了同样的问题,通过卸载应用程序并重新安装来修复它。
回答by Frim
I got the same problem and fixed it by just wiping the user data on the emulator. My guess is that the emulator keeps the project installed unless you wipe the data, so if your new project doesn't match some internal parameters it doesn't like it and won't reinstall it.
我遇到了同样的问题,只需擦除模拟器上的用户数据即可解决。我的猜测是,除非您擦除数据,否则模拟器会保持项目安装,因此如果您的新项目与某些内部参数不匹配,它就不喜欢它并且不会重新安装它。
回答by Frim
ah i think i found your answer:
啊,我想我找到了你的答案:
Why does the app signature change in Android after a classpath change?
为什么在类路径更改后 Android 中的应用程序签名会更改?
its changed if you change the classpath
如果您更改类路径,它会更改
回答by Valeh A?ayev
After searching and checking the phone, i came to know that i am currently developing 2nd version of this application which is already downloaded from android market in my phone, now as this app is signed and having different signatures this is throwing the above error.
搜索并检查手机后,我才知道我目前正在开发该应用程序的第二个版本,该应用程序已从手机中的 android 市场下载,现在由于此应用程序已签名且具有不同的签名,因此会引发上述错误。
Now, to resolve this issue, i had just uninstalled the app from mobile and run/install the application again.
现在,为了解决这个问题,我刚刚从移动设备上卸载了该应用程序并再次运行/安装该应用程序。
回答by Christos Mitsis
I had the same issue with the emulator and i ran the command "adb uninstall TheNameOfPackage". Of course you must first go to the directory where the adb.exe has been installed, usually C:\Program Files\Android\android-sdk\platform-tools, and then run the above command.
我在模拟器上遇到了同样的问题,我运行了命令“adb uninstall TheNameOfPackage”。当然首先要到adb.exe已经安装的目录下,一般是C:\Program Files\Android\android-sdk\platform-tools,然后运行上面的命令。
回答by user330844
For me after I copied all of my keystore files from my machine at home, I had to do a Project->clean. After that it worked perfectly.
对我来说,在我从家里的机器上复制了所有密钥库文件后,我必须执行一个 Project->clean。之后它完美地工作。