添加 Unity 的 classes.jar 檔到 Android Studio 專案中後,在匯出 JAR 檔時,是否有發生以下錯誤呢?

Error processing xxx\Test\app\libs\classes.jar:com\unity3d\player\ReflectionHelper.class: broken class file?
...
...
...
Error processing xxx\Test\app\libs\classes.jar:org\fmod\FMODAudioDevice.class: broken class file?

image1.jpg    

 

其實這是你的 Unity 版本太舊了,建議換 Unity 5.0.0 以上的版本裡面的 classes.jar 就不會有錯誤了,或許 Unity 4.6.0 的也可以,但我沒測試過。

 

該教學的一系列文章:
Android Studio 匯出 JAR 檔
Android Studio 匯出 JAR 檔 - 加入 Unity classes.jar
Android Studio 匯出 JAR 檔 - 在 Unity 中調用 Android Function
Android Studio 匯出 JAR 檔 - 在 Android 中呼叫 Unity Method

 

可能會遇到的問題:
Android Studio 匯出 JAR 檔 - 呼叫 Function 無反應
Android Studio 匯出 JAR 檔 - broken class file

 

arrow
arrow

    岳 發表在 痞客邦 留言(0) 人氣()