- Home /
problem with android build
I have a project that only has some cubes and it's just for test. less than 30 MB. when I want to build my project for android an error apears:
CommandInvokationFailure: Failed to create a assets.ap_ package
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="F:/Apps/SDK\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
I read somewhere that if you check the "Use Legacy SDK" the error should be solved. I did that and the error solved but no output will be in the folder after build.
Another problem with an service. I used to use "Play Services Resolver" but it seems to be deleted in Unity 2018.4 Also I used that github package but with no result.(Maybe I used it wrong) here is the error text:
CommandInvokationFailure: Unable to convert classes into dex format.
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="F:/Apps/SDK\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
What should I do with those?
the last error sometimes appears when there are plugins duplicated in the project check if thats the case
I checked this. there is no duplicated plug-ins. This can be solved by "Play Services Resolver" but as you can see below in my version it doesn't exist. Thanks anyway.
that plugin is not distribute with unity, go to this link https://github.com/googlesamples/unity-jar-resolver and download external-dependency...unitypackage then go to assets>import package> custom package and select that file
Answer by mostashhed · Aug 02, 2020 at 05:09 AM
Both were SDK version erorrs. Update build tools to the latest version solved it.