我在我的Unity应用中使用Admob和Google Play服务。
我收到合并清单文件错误但我已经对项目中的所有清单文件进行了更改(MinSDk,TargetSDK,@ android:value)
但我仍然遇到以下错误。
CommandInvokationFailure: Unable to merge android manifests.
See the Console for more details.
C:\Program Files\Java\jdk1.8.0_101\bin\java.exe -Xmx2048M-Dcom.android.sdkmanager.toolsdir="E:\adt-bundle-windows-x86-20130717\sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
Error: [Temp\StagingArea\AndroidManifest-main.xml:22, F:\Unity_workspace\Game\Temp\StagingArea\android-libraries\play-services-basement-9.6.1\AndroidManifest.xml:5] Trying to merge incompatible /manifest/application/meta-data[@name=com.google.android.gms.version] element:
<meta-data
@android:name="com.google.android.gms.version"
-- @android:value="8115000">
<meta-data
@android:name="com.google.android.gms.version"
++ @android:value="@integer/google_play_services_version">
]
stdout[
[Temp\StagingArea\AndroidManifest-main.xml:22, F:\Unity_workspace\Game\Temp\StagingArea\android-libraries\MainLibProj\AndroidManifest.xml:13] Skipping identical /manifest/application/meta-data[@name=com.google.android.gms.version] element.
[Temp\StagingArea\AndroidManifest-main.xml:24, F:\Unity_workspace\Game\Temp\StagingArea\android-libraries\play-services-ads-lite-9.6.1\AndroidManifest.xml:10] Skipping identical /manifest/application/activity[@name=com.google.android.gms.ads.AdActivity] element.
]
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()
任何帮助都是欢迎。
答案 0 :(得分:0)
正如您所猜测的,在项目的某个位置,google_play_services_version字段是硬编码的。
在代码编辑器中搜索整个解决方案,以获取值class MonitorCallback(tflearn.callbacks.Callback):
def __init__(self, api):
self.my_monitor_api = api
def on_epoch_end(self, training_state):
self.my_monitor_api.send({
accuracy: training_state.global_acc,
loss: training_state.global_loss,
})
monitorCallback = new MonitorCallback(api)
model = ...
model.fit(..., callbacks=monitorCallback)
。
将值替换为8115000
。
你说你已经完成了所有清单,但它可能不在清单中,它可能是一个值xml文件。