@@ -439,7 +439,7 @@ public bool PopupEnabled
439439 private bool isQuittingApplication ;
440440#endif
441441
442- #if ! UNITY_EDITOR && UNITY_ANDROID
442+ #if ! UNITY_EDITOR && UNITY_ANDROID && UNITY_ANDROID_JNI
443443 private DebugLogLogcatListener logcatListener ;
444444#endif
445445
@@ -601,11 +601,17 @@ private void OnEnable()
601601
602602 if ( receiveLogcatLogsInAndroid )
603603 {
604- #if ! UNITY_EDITOR && UNITY_ANDROID
604+ #if UNITY_ANDROID
605+ #if UNITY_ANDROID_JNI
606+ #if ! UNITY_EDITOR
605607 if ( logcatListener == null )
606608 logcatListener = new DebugLogLogcatListener ( ) ;
607609
608610 logcatListener . Start ( logcatArguments ) ;
611+ #endif
612+ #else
613+ Debug . LogWarning ( "Android JNI module must be enabled in Package Manager for \" Receive Logcat Logs In Android\" to work." ) ;
614+ #endif
609615#endif
610616 }
611617
@@ -634,7 +640,7 @@ private void OnDisable()
634640 if ( ! receiveLogsWhileInactive )
635641 Application . logMessageReceivedThreaded -= ReceivedLog ;
636642
637- #if ! UNITY_EDITOR && UNITY_ANDROID
643+ #if ! UNITY_EDITOR && UNITY_ANDROID && UNITY_ANDROID_JNI
638644 if ( logcatListener != null )
639645 logcatListener . Stop ( ) ;
640646#endif
@@ -717,7 +723,7 @@ private void Update()
717723 lastFrameCount = Time . frameCount ;
718724#endif
719725
720- #if ! UNITY_EDITOR && UNITY_ANDROID
726+ #if ! UNITY_EDITOR && UNITY_ANDROID && UNITY_ANDROID_JNI
721727 if ( logcatListener != null )
722728 {
723729 string log ;
0 commit comments