简体   繁体   中英

Unity and Admob Integration

I have added the admob Package to my project but when i try to build the apk file this error shows up:

在此处输入图片说明

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_25\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/PC-Boulot/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\PROGRAM FILES\UNITY\EDITOR\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
Error:Invalid command dx
]
stdout[

]
exit code: 64
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.BuildPlayerWindow:BuildPlayerAndRun()

What Unity version are you using ? this used to happen due to a Unity bug which has been resolved since then.

Try to migrate your project to Unity 2017.1 to see if that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM