Android build SDK problem
So hey , ive build a 2D project on unity which i sort of finished just few stuff i need to do , i decided to try it out on android and it works bad on editor when i do Remote on android phone and ive reserched that when you build it fix this.
I've downloaded Android Studio http://prntscr.com/iohz2o , it auto downloaded it to this folder ( because ive seen some poeple having it on appdata and for some reason by default on my computer it didn't so im pointing that out ).
Then after downloading it ive downloaded the SDK through SDK manager (http://prntscr.com/ioi08l) and ive put it on folder on C driver directly ( ive tried on 10-15 other locations and still dident worked ) then inside unity http://prntscr.com/ioi1qc i put it on the browse for SDK but it still gives the error that it doesnt find the ptah , it gives this error CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct.
ive asked this on stackoverflow and a forum on my language and i got many solutions which none worked. please i realy dont understand this stupid problem and why it causing this and i would really really appriciate any help !!
Answer by ikhsaniks · Mar 14, 2018 at 04:07 PM
Hi @R3xyS3xy Unity version of 2017 or later are only compatible with SDK 25.2.5 and JDK 1.8.161 (I think). So change your SDK -> Tools with 25.2.5 version. If you don't want to overwrite your tools folder you can rename it to something else. Here is my SDK and JDK you can download and add it to the Unity -> Preferences -> External Build https://drive.google.com/drive/folders/16n3hvR9JfTaKWW0MGNDhHLc6XIg3agM9?usp=sharing
hope it works on you. Insya Allah. Regards, Ikhsan Syahputra.
it sort of worked and fixed the android error , but made a new error :
ommandInvokationFailure: Gradle build failed. C:/Program Files/Java/jdk1.8.0_161\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.Gradle$$anonymous$$ain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception. ive also tried your verison on JD$$anonymous$$ and another one ive seen on other forum and both wont work. any suggestions?
Have you tried to change the Tools folder on the Android SD$$anonymous$$? and change it to 25.2.5 version?
İ want to show admob advertisements in my project. I've read from somewhere , that i must use newest sdk and jdk to show ads . but if i use old sdk-jdk , ads are not showing . But on the other hand if i use newest sdk i get same error.Please help me
Answer by Falplay · Mar 24, 2018 at 11:17 PM
i have the same problem changed the sdk tools put now it says that i have to update the tools
Your answer
Follow this Question
Related Questions
[Android VR app build error] CommandInvokationFailure: Gradle build failed. 0 Answers
Unable to list target platforms. Build SDK trouble. 1 Answer
Facebook SDK integration in Unity 2018 0 Answers
Unity says that I'm missing my NDK and SDK libraries, but I have them installed via Unity hub? 1 Answer
CommandInvokationFailure: Failed to re-package resources 0 Answers