• Unity3D安卓出包报错


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

    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()
    
    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()
    

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

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

  • 相关阅读:
    Django中自定义标签的所有步骤
    django的settings详解(1)
    django中@property装饰器的运用
    设计没有标准,只有目标
    小学的题 大学的解法
    中国移动创新系列丛书《OPhone应用开发权威指南》读者交流活动圆满结束
    中国移动创新系列丛书《OPhone应用开发权威指南》读者交流活动
    开源软件技巧与精髓分享
    博文视点大讲堂28期:助你赢在软件外包行业
    网络营销大师力作,亚马逊营销图书传奇
  • 原文地址:https://www.cnblogs.com/davidsheh/p/6056534.html
Copyright © 2020-2023  润新知