今天又遇到了在安卓出包時须鼎,直接報錯了兩個錯誤,報錯信息分別如下:
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()
安卓出包時出現(xiàn)這個bug的原因稼跳,是因為當前項目的包名和手機上已安裝的某個app包名相同,導(dǎo)致了沖突。解決辦法就是直接將手機上導(dǎo)致沖突的app直接卸載掉就OK了慎玖。
這個bug已經(jīng)遇到過多次了痹届,是因為我在真機測試時裝了一個測試程序呻待,然后過了一段時間后,PlayerSettings中的某些設(shè)置被改變了队腐,沒有刪除安裝的測試包蚕捉,就直接Build And Run
,然后就報上述的錯誤了柴淘。
把這個Bug在博客里記錄一下迫淹,加深點印象,順便分享出去为严,希望能幫到遇到同樣問題的朋友敛熬。
如果本文有錯誤之處還請幫忙指出。
本文作者: Sheh偉偉
本文鏈接: http://davidsheh.github.io/2016/08/23/Unity3D安卓出包報錯/
版權(quán)聲明: 本博客所有文章除特別聲明外第股,均采用 CC BY-NC-SA 3.0 許可協(xié)議应民。轉(zhuǎn)載請注明出處!