一、untiy2017 设置sdkversion为22 打包报错 but library uses targetSdkVersion='26'
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_171\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/android-sdk-new\tools" -Dfile.encoding=UTF8 -jar "D:\software\Unity2017.1.2f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
]
stdout[
Warning: [Temp\StagingArea\AndroidManifest-main.xml:4, E:\LHDB\lhdb_gamehall\xj\testsdk_22\Temp\StagingArea\android-libraries\unity-android-resources\AndroidManifest.xml:1] Main manifest has
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
发现问题:
1) 搜索所有的xml文件修改为22
2)删除没用的res包
解决方法:没有办法,unity2017无法打包sdkversion 为22的。
二、uc要求签名为V1,unity项目打出来为v1+v2
查看签名类型代码:进入sdk文件夹,>25版本的,找到apksigner.jar的文件夹
输入: java -jar apksigner.jar verify -v apk文件路径
E:\android-sdks2\android-sdks\build-tools\27.0.3\lib>java -jar apksigner.jar verify -v E:\LHDB\lhdb_gamehall\gamehallApp\2.3.0716\Release\Android\Normal\uc_206_uc.apk
解决方法:去掉原来的keystore文件,不带keystore打出的包就是只有v1的。