当前位置:   article > 正文

Unity3D安卓出包报错_unity3d安装失败: installation failed

unity3d安装失败: installation failed

今天又遇到了在安卓出包时,直接报错了两个错误,报错信息分别如下:

Installation failed with the following output:
pkg: /data/local/tmp/Package.apk

UnityException: Unable to install APK!
Installation failed. See the Console for details.

两个错误信息的详细描述如下:

Installation failed with the following output:
    pkg: /data/local/tmp/Package.apk

Failure [INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE]

5194 KB/s (24217926 bytes in 4.553s)

UnityEditor.HostView:OnGUI()
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
UnityException: Unable to install APK!
Installation failed. See the Console for details.
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message)
UnityEditor.Android.PostProcessAndroidPlayer.UploadAndStartPlayer (System.String manifestName, System.String stagingArea, UnityEditor.Android.AndroidDevice device, System.String packageName, Boolean developmentPlayer, Boolean retryUpload)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

安卓出包时出现这个bug的原因,是因为当前项目的包名和手机上已安装的某个app包名相同,导致了冲突。解决办法就是直接将手机上导致冲突的app直接卸载掉就OK了。
这个bug已经遇到过多次了,是因为我在真机测试时装了一个测试程序,然后过了一段时间后,PlayerSettings中的某些设置被改变了,没有删除安装的测试包,就直接Build And Run,然后就报上述的错误了。
把这个Bug在博客里记录一下,加深点印象,顺便分享出去,希望能帮到遇到同样问题的朋友。

如果本文有错误之处还请帮忙指出。本文欢迎转载,但转载请注明出处:http://www.jianshu.com/users/fd3eec0ab0f2/latest_articles

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/110992
推荐阅读
相关标签
  

闽ICP备14008679号