Unity3d與安卓的互動1.0
阿新 • • 發佈:2018-12-21
Unity : java.lang.NoSuchMethodError: no non-static method with name=‘OpenGallery’ signature=’()V’ in class Ljava.lang.Object;
Unity : at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:49)
Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
Unity : at com.unity3d.player.UnityPlayer$c
c.run(Unknown Source:20)
Unity : at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in :0
Unity : at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in :0
unity在調取自己自定義的安卓方法,當找不到方法時,要注意AndroidManifest.xml與jar包的目錄層級關係,要與eclipse的目錄對應。隨意放置AndroidManifest.xml與jar的目錄會調取不到的。