How to configure Unity 2017.4 for Android and avoid build failures in OSX?

I am trying to make several build crashes after installing a new / new system with the latest version of Android Studio (3.1) and Unity (2017.4). Failures like: CommandInvokationFailure : Unable to display target platforms. Make sure that the sdk path for Android is correct , which covers several duplicates, as the proposed solutions are workarounds and do not explain the root problem and how to elegantly solve this problem on a Mac.

In Unity → Settings → External Tools . I correctly set the Android SDK path to the one installed by Android Studio, as well as the JDK, to point to the JDK version 8 (I know that Android tools do not work with Java 9+ right now) but I still get build failures.

I am looking for a solution that:

  • allows you to store multiple java versions (I use jenv )
  • doesn't mix with symbolic links in my java setup
  • allows me to use my sdk installation for Android (I use it in Android Studio) and does not require me to bother with it (for example, reset Android Tools), except to officially install the missing module
+4
source share
1 answer

, Android- Unity JDK, , java, /usr/libexec/java_home Mac. JDK 8 (v 9 10 ).

, Java 9/10 , , /usr/libexec/java_home JDK 8.

, JDK , Info.plist Contents .

: , Android Studio SDK

. , /Library/Java/JavaVirtualMachines, , 9 ( 9 10), Contents Info.plist Info.plist.off . JDK , $JAVA_HOME script (, jenv). /usr/libexec/java_home JDK 8 VM, .

, , Google , Android Java, Unity SDK, / Java .

+4

Source: https://habr.com/ru/post/1695698/


All Articles