从IDE开始的内部错误

时间:2014-02-13 11:23:47

标签: android visual-studio-2012 android-4.0-ice-cream-sandwich

我使用visual studio 2012和xamarin开发了一个Android应用程序。我在一个拥有不同机器的团队中工作。我在nexus 4设备上启动我的Android应用程序,并且每个方面都有效。当我从其他机器启动我的Android应用程序时,我收到内部错误:

由于内部错误导致部署失败:失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]

Xamarin.AndroidTools.AndroidDeploymentException:InternalError ---> Mono.AndroidTools.InstallFailedException:失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]    bei Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output,String packageName)    bei Mono.AndroidTools.AndroidDevice。<> c_ DisplayClass2a.b _29(Task 1 t) bei System.Threading.Tasks.ContinuationTaskFromResultTask 1.InnerInvoke()    bei System.Threading.Tasks.Task.Execute()    --- Ende derinternenAusnahmestapelüberwachung---    bei Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken令牌)    bei Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)

我已经在我的设备上卸载了应用程序,我用adb shell卸载了它。为什么我会收到此内部错误。有任何想法吗?我要改变我的清单吗?

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="net.package.name" android:installLocation="auto"  android:versionName="1.9" android:versionCode="10">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18" />
<application android:debuggable="true" android:label="name" android:icon="@drawable/ic_launcher" android:theme="@style/Theme.Styled"></application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

2 个答案:

答案 0 :(得分:2)

问题与ADB有关,而不是代码。正如@ozwislon所建议的那样,如果要从其他计算机安装应用程序,则必须手动卸载应用程序

这是因为用于签署任何调试应用程序的android debug.keystore。为了避免在我的团队中出现安装/卸载烦人的问题,我们使用的debug.keystore位于C:\Users\your_username_here\.android

答案 1 :(得分:1)

我遇到了同样的问题。我所要做的就是进入设置|应用程序菜单并首先删除应用程序。出于某种原因,VS / Xamarin插件没有正确地从设备中删除应用程序。即使手动使用ADB shell也没有为我正确删除它。

如果这对您不起作用,您可以在Xamarin论坛上尝试其他一些事情:

Xamarin Deployment failed because of an internal error