unity3d - Failed to compile Java code to DEX in Unity -


i'm trying build android project in unity , receive error:

failed compile java code dex: c:\users\tziuka-pc\desktop\project teo\temp/stagingarea> java -xmx1024m -djava.ext.dirs="c:/users/tziuka-pc/desktop/dev2/android-sdk-windows\platform-tools/lib/" -jar "c:/users/tziuka-pc/desktop/dev2/android-sdk-windows\platform-tools/lib/dx.jar" --dex --verbose --output=bin/classes.dex bin/classes.jar plugins error: unable access jarfile c:/users/tziuka-pc/desktop/dev2/android-sdk-windows\platform-tools/lib/dx.jar  unityengine.debug:logerror(object) postprocessandroidplayer:builddex(string, string) (at c:/buildagent/work/14194e8ce88cdf47/editor/mono/buildpipeline/postprocessandroidplayer.cs:634) postprocessandroidplayer:postprocess(buildtarget, string, string, string, string, string, string, buildoptions) (at c:/buildagent/work/14194e8ce88cdf47/editor/mono/buildpipeline/postprocessandroidplayer.cs:249) unityeditor.hostview:ongui() 

i use 1 plugin admob. when delete plugin, goes well. how can fix this?

as per documentation, caused outdated version of java. try updating java installation.

building dex failed
error produce message similar following:-

building dex failed! g:\unity\javapluginsample\temp/stagingarea> java -xmx1024m -djava.ext.dirs="g:/androidsdk/android-sdk_r09-windows\platform-tools/lib/" -jar "g:/androidsdk/android-sdk_r09-windows\platform-tools/lib/dx.jar"  --dex --verbose --output=bin/classes.dex bin/classes.jar plugins error occurred  during initialization of vm not reserve enough space object heap not create java virtual machine. caused having wrong version of java installed on machine. updating java installation latest version solve issue. 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -