简体   繁体   English

在构建和Android项目时此错误是什么意思?

[英]What does this error mean when building and Android project?

I am developing an Android application in Eclipse but it shows the following in my console when I clean, build and debug it: 我正在用Eclipse开发一个Android应用程序,但是当我清理,构建和调试该应用程序时,它将在控制台中显示以下内容:

[2013-06-05 09:05:37 - TSRAndroidSystem] ------------------------------
[2013-06-05 09:05:37 - TSRAndroidSystem] Android Launch!
[2013-06-05 09:05:37 - TSRAndroidSystem] adb is running normally.
[2013-06-05 09:05:37 - TSRAndroidSystem] Performing com.lk.lankabell.android.activity.LoginPage activity launch
[2013-06-05 09:05:37 - TSRAndroidSystem] Automatic Target Mode: launching new emulator with compatible AVD 'test'
[2013-06-05 09:05:37 - TSRAndroidSystem] Launching a new emulator with Virtual Device 'test'
[2013-06-05 09:05:49 - Emulator] Failed to create Context 0x3005
[2013-06-05 09:05:49 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2013-06-05 09:05:51 - TSRAndroidSystem] New emulator found: emulator-5554
[2013-06-05 09:05:51 - TSRAndroidSystem] Waiting for HOME ('android.process.acore') to be launched...
[2013-06-05 09:06:42 - TSRAndroidSystem] HOME is up on device 'emulator-5554'
[2013-06-05 09:06:42 - TSRAndroidSystem] Uploading TSRAndroidSystem.apk onto device 'emulator-5554'
[2013-06-05 09:06:44 - TSRAndroidSystem] Installing TSRAndroidSystem.apk...
[2013-06-05 09:07:13 - TSRAndroidSystem] Re-installation failed due to different application signatures.
[2013-06-05 09:07:13 - TSRAndroidSystem] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2013-06-05 09:07:13 - TSRAndroidSystem] Please execute 'adb uninstall com.lk.lankabell.android.activity' in a shell.
[2013-06-05 09:07:13 - TSRAndroidSystem] Launch canceled!

My emulator is running though. 我的模拟器正在运行。

Is it an error, a warning or is it saying that I have to unlock my android emulator screen? 是错误,警告还是说我必须解锁我的Android模拟器屏幕?

This normally happens when you develop on multiple computers. 当您在多台计算机上进行开发时,通常会发生这种情况。

When you install an application from Eclipse it uses your debug keystore to sign the application. 从Eclipse安装应用程序时,它会使用调试密钥库对应用程序进行签名。 Different computers have different debug keystores (they are just generated automatically), so you have to fully remove the app from your device before installing it again. 不同的计算机具有不同的调试密钥库(它们只是自动生成的),因此您必须从设备中完全删除该应用程序,然后才能再次安装它。

Not sure why this would happen on the emulator, but just fully remove the app from the emulator and it should work. 不知道为什么会在模拟器上发生这种情况,但是只需将应用程序从模拟器中完全删除就可以了。

Actually this Scenario was oocured for me many times when i use phone for testing my application 实际上,当我使用手机来测试应用程序时,这种情况对我来说已经发生了很多次

This is because you had installed TSRAndroidSystem alredy in your phone .Te error occur because the app that installed in your phone uses differnt debug keystore that present in your system . 这是因为您已在手机中安装了TSRAndroidSystem alredy。由于手机中安装的应用程序使用系统中存在的其他debug keystore ,所以会发生TSRAndroidSystem错误。

But in your case it happened in emulator . 但是在您的情况下,它发生在模拟器中。 It's really wiered to me . 我真的很烦。

Did you directly insatlled the TSRAndroidSystem.apk developed in another system in your emulator ?? 您是否直接在模拟器中的另一个系统中安装了TSRAndroidSystem.apk

Any way i thing by un-installing the alredy installed app from your Emulator . 无论如何,我都可以通过从模拟器卸载已安装的已安装应用程序来实现。 Then run your project so that the app will be signed with debug keystore of your system hope this will sove your issue 然后运行您的项目,以便应用程序将使用系统的debug keystore进行签名,希望这可以解决您的问题

这意味着您需要从上次启动该应用程序的设备上卸载该应用程序。

That error usually occurs when you have another application with the same package name installed on the device. 当您在设备上安装了另一个具有相同程序包名称的应用程序时,通常会发生该错误。 In your case com.lk.lankabell.android . 在您的情况下com.lk.lankabell.android

It can also happen when you develop on multiple computers which means different debug keys in which case the application with the same package is the one you try to install. 当您在多台计算机上进行开发时,也可能发生这种情况,这意味着使用不同的调试密钥,在这种情况下,您尝试安装的软件包具有相同的软件包。 But since you are using an emulator this cannot be the case. 但是由于您正在使用仿真器,所以情况并非如此。

In either case: go to Settings > Apps on your emulator or phone and uninstall the app with that particular package name and try again. 无论是哪种情况,请执行以下操作:在模拟器或电话上转到Settings > Apps ,然后使用该特定程序包名称卸载应用程序,然后重试。 And always make sure to choose unique package names to prevent this from happening. 并始终确保选择唯一的程序包名称,以防止发生这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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