【unity】android错误Field currentActivity or type signature not found

编程入门 行业动态 更新时间:2024-10-25 12:29:44

错误现象:

UnityEngine._AndroidJNIHelper.GetFieldID (System.IntPtr jclass, System.String fieldName, System.String signature, System.Boolean isStatic) [0x00082] in <7dbed83b26eb419d871f118701305875>:0 
  at UnityEngine.AndroidJNIHelper.GetFieldID (System.IntPtr javaClass, System.String fieldName, System.String signature, System.Boolean isStatic) [0x00001] in <7dbed83b26eb419d871f118701305875>:0 
  at UnityEngine._AndroidJNIHelper.GetFieldID[ReturnType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) [0x00012] in <7dbed83b26eb419d871f118701305875>:0 
  at UnityEngine.AndroidJNIHelper.GetFieldID[FieldType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) [0x00001] in <7dbed83b26eb419d871f118701305875>:0 
  at UnityEngine.AndroidJavaObject._GetStatic[FieldType] (System.String fieldName) [0x0000c] in <7dbed83b26eb419d871f118701305875>:0 
  at UnityEngine.AndroidJavaObject.GetStatic[FieldType] (System.String fieldName) [0x00001] in <7dbed83b26eb419d871f118701305875>:0 
  at ClipboardHelper.Copy (System.String text) [0x00030] in <c2a60710cec84649b7ea22f96db75d0c>:0 
  at OnButtonClick (System.Int32 index) [0x00085] in <c2a60710cec84649b7ea22f96db75d0c>:0 |Field currentActivity or type signature  not found

错误原因:

主要是平台错误,比如在editor上面运行的代码,运行到了Android的代码,导致在editor上面运行的时候找不到对应的signature 错误。一般是UNITY_EDITOR宏是关闭的导致的。

更多推荐

【unity】android错误Field currentActivity or type signature not found

本文发布于:2023-06-14 01:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1422007.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   android   unity   Field   signature

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!