zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Nginx Http模块开发
    nginx模块开发获取post参数
    nginx上传模块nginx_upload_module和nginx_uploadprogress_module模块进度显示,如何传递GET参数等。
    Spring data jpa 复杂动态查询方式总结
    springData Jpa 快速入门
    从一个简单的 JPA 示例开始
    java中使用Protobuf的实例(Demo)
    Protocol Buffers官方文档(开发指南)
    protobuf(Protocol Buffers)java初体验
    [thrift] thrift基本原理及使用
  • 原文地址:https://www.cnblogs.com/davidsheh/p/6056534.html
Copyright © 2011-2022 走看看