0

[1]at first we thought to develop Android SDK in the traditional way, however, the multdex problem causes missing third-party library. Therefore, we have developed the SDK with Gradle but while integrating with Unity, Unity does not support the SDK which is developed with Gradle.

Unity version: 4.7

Is there any good solution for this?

The error log is as follows:

CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[

trouble writing output: Too many field references to fit in one dex file: 72403; max is 65536. You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.

Meggie
  • 23
  • 3
  • You are developing Android SDK? I don't understand that but Unity supports Android export with Gradle in 5.5 version and above. – Programmer Sep 20 '17 at 06:19
  • Thank you, but the game was developed with Unity (version 4.7) and it is not easy to change, so we only need to modify the SDK....So I came here to ask for help with this situation. – Meggie Sep 20 '17 at 07:32
  • Export the Unity project out with [this](https://stackoverflow.com/questions/38980792/exporting-and-running-unity3d-project-to-android-studio/39008549?s=1|0.0000#39008549) tutorial then use [this](https://stackoverflow.com/questions/42582850/too-many-field-references-70613-max-is-65536/42583210#42583210) to fix the multi-dex error. – Programmer Sep 20 '17 at 07:37
  • We already tried but does not work... – Meggie Sep 20 '17 at 07:48
  • I have no option but to close this error question as duplicate. Hope that works for you. – Programmer Sep 20 '17 at 10:48

0 Answers0