Start a new topic

Reg - Unity and Android Studio integration

Hi All,

I’ve just started working on Integrating Unity and Wikitude on Android Native application. I created a unity 3d plugin Wikitude project and import it as a .aar file inside the android studio. Everything working fine except for the camera. It is not turning on inside the android studio project. I ran the same project in the unity itself and seems to be working fine. But when I export the project to android studio and use it as a library file, the Camera is not opening. 

 

I tried all the solution that is mentioned in this link

https://support.wikitude.com/support/discussions/topics/5000090753/page/1?url_locale=


Why the camera is not opening inside android studio project while I am using it as a library .aar ?


Below mentioned images are the screens appearing when I try to access the camera.


Image 1:

image


Image 2:

image


Please find below my Environment Configurations

1. ANDROID STUDIO VERSION:3.5.2

2. UNITY VERSION: Unity 2018.4.13f1

3. ANDROID GRADLE PLUGIN VERSION:3.5.2

4. GRADLE VERSION:5.4.1

5. ANDROID SDK VERSION: 29(API 29:Android 10.0 (Q))

6. JDK VERSION: OpenJDK 1.8.0_152

7. NDK VERSION: Android NDK-r16b 

8. DEVICE USED –REDMI NOTE7 PRO (API -27)


This is my log from Android Studio:

2019-12-18 13:42:34.521 25682-25682/com.example.unityandroid I/le.unityandroi: Late-enabling -Xcheck:jni

2019-12-18 13:42:34.548 25682-25682/com.example.unityandroid W/le.unityandroi: miui_dex2oat: DeoptimizeBootImage: patch entry points of methods in boot image to interpreter bridge

2019-12-18 13:42:34.677 25682-25682/com.example.unityandroid W/le.unityandroi: miui_dex2oat: OatFile: /data/app/com.example.unityandroid-2oJkSGX9rvAvFPd2JIcdPA==/oat/arm64/base.odex Compiler-Filter = speed-profile

2019-12-18 13:42:34.702 25682-25682/com.example.unityandroid I/Perf: Connecting to perf service.

2019-12-18 13:42:34.762 25682-25682/com.example.unityandroid W/le.unityandroi: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)

2019-12-18 13:42:34.763 25682-25682/com.example.unityandroid W/le.unityandroi: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)

2019-12-18 13:42:34.818 25682-25710/com.example.unityandroid I/Adreno: QUALCOMM build : 89f10b9, I3d0e3ac366

    Build Date                       : 12/25/18

 OpenGL ES Shader Compiler Version: EV031.25.14.03

    Local Branch                     :

    Remote Branch                    :

    Remote Branch                    :

    Reconstruct Branch               :

2019-12-18 13:42:34.818 25682-25710/com.example.unityandroid I/Adreno: Build Config : S P 6.0.9 AArch64

2019-12-18 13:42:34.820 25682-25710/com.example.unityandroid I/Adreno: PFP: 0x016ee177, ME: 0x00000000

2019-12-18 13:42:34.824 25682-25710/com.example.unityandroid I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0

2019-12-18 13:42:34.824 25682-25710/com.example.unityandroid I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

2019-12-18 13:42:34.825 25682-25710/com.example.unityandroid I/OpenGLRenderer: Initialized EGL, version 1.4

2019-12-18 13:42:34.825 25682-25710/com.example.unityandroid D/OpenGLRenderer: Swap behavior 2

2019-12-18 13:42:34.862 25682-25710/com.example.unityandroid E/LB: fail to open file: No such file or directory

2019-12-18 13:43:03.642 25682-25682/com.example.unityandroid D/ViewRootImpl[MainActivity]: changeCanvasOpacity: opaque=false

2019-12-18 13:43:04.117 25682-25682/com.example.unityandroid D/ViewRootImpl[MainActivity]: changeCanvasOpacity: opaque=true

2019-12-18 13:43:05.181 25682-25682/com.example.unityandroid I/Timeline: Timeline: Activity_launch_request time:97006355

2019-12-18 13:43:05.210 25682-25682/com.example.unityandroid W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@80748fe

2019-12-18 13:43:05.237 25682-25682/com.example.unityandroid I/Timeline: Timeline: Activity_launch_request time:97006410

2019-12-18 13:43:05.339 25682-25682/com.example.unityandroid W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@9770ce0

2019-12-18 13:43:05.623 25682-25738/com.example.unityandroid W/le.unityandroi: Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (light greylist, reflection)

2019-12-18 13:43:05.632 25682-25738/com.example.unityandroid E/Unity: Unable to find arcore_unity_api

2019-12-18 13:43:05.632 25682-25738/com.example.unityandroid W/Unity: ARCore Unity Plugin could not be loaded: arcore_unity_api.so not found

  (Filename:  Line: 22)

2019-12-18 13:43:05.657 25682-25738/com.example.unityandroid I/Unity: SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 3664mb

2019-12-18 13:43:05.657 25682-25738/com.example.unityandroid I/Unity: SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc0), 6 little (mask: 0x3f)

2019-12-18 13:43:05.658 25682-25738/com.example.unityandroid I/Unity: ApplicationInfo com.example.unityandroid version 1.0 build 7b4052ae-fc47-4cb5-8b40-2a0410a6b1a2

2019-12-18 13:43:05.658 25682-25738/com.example.unityandroid I/Unity: Built from '2018.4/release' branch, Version '2018.4.13f1 (497f083a43af)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'

2019-12-18 13:43:05.779 25682-25738/com.example.unityandroid E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted

2019-12-18 13:43:05.780 25682-25738/com.example.unityandroid I/chatty: uid=10341(com.example.unityandroid) UnityMain identical 14 lines

2019-12-18 13:43:05.780 25682-25738/com.example.unityandroid E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted

2019-12-18 13:43:06.033 25682-25738/com.example.unityandroid D/Unity: GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_EXT_texture_format_sRGB_override GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_EGL_image_external_wrap_modes GL_EXT_multisampled_render_to_texture GL_EX

2019-12-18 13:43:06.033 25682-25738/com.example.unityandroid D/Unity: T_multisampled_render_to_texture2 GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_draw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_EXT_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OES_EGL_image_external_essl3 GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_blit_framebuffer_params GL_EXT_clip_cull_dis

2019-12-18 13:43:06.033 25682-25738/com.example.unityandroid D/Unity: tance GL_EXT_protected_textures GL_EXT_shader_non_constant_global_initializers GL_QCOM_texture_foveated GL_QCOM_shader_framebuffer_fetch_noncoherent GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_EGL_image_array GL_NV_shader_noperspective_interpolation GL_KHR_robust_buffer_access_behavior GL_EXT_EGL_image_storage GL_EXT_blend_func_extended GL_EXT_clip_control GL_QCOM_validate_shader_binary

2019-12-18 13:43:06.113 25682-25772/com.example.unityandroid D/AudioTrack: get packages (com.example.unityandroid) for calling UID 10341

2019-12-18 13:43:06.113 25682-25772/com.example.unityandroid D/AudioTrack: set(): Force removing AUDIO_OUTPUT_FLAG_RAW

2019-12-18 13:43:06.138 25682-25772/com.example.unityandroid W/AudioTrack: Use of stream types is deprecated for operations other than volume control

2019-12-18 13:43:06.138 25682-25772/com.example.unityandroid W/AudioTrack: See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case

2019-12-18 13:43:06.245 25682-25738/com.example.unityandroid V/MediaRouter: Adding route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }

2019-12-18 13:43:06.258 25682-25738/com.example.unityandroid V/MediaRouter: Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }

2019-12-18 13:43:08.497 25682-25738/com.example.unityandroid E/Unity: Unable to find UnityAndroidBridge

2019-12-18 13:43:08.506 25682-25738/com.example.unityandroid E/Unity: DllNotFoundException: Unable to load DLL 'UnityAndroidBridge': The specified module could not be found.

 at Wikitude.AndroidWikitudeBridge.UnityWikitudeBindings_StartWikitudeNativeSDK () [0x00000] in <00000000000000000000000000000000>:0

 

 (Filename: currently not available on il2cpp Line: -1)

2019-12-18 13:43:08.565 25682-25747/com.example.unityandroid D/NetworkSecurityConfig: No Network Security Config specified, using platform default

2019-12-18 13:43:08.572 25682-25747/com.example.unityandroid I/DpmTcmClient: RegisterTcmMonitor from: $Proxy0

2019-12-18 13:43:08.583 25682-25738/com.example.unityandroid E/Unity: Error initializing C# functions! System.DllNotFoundException: Unable to load DLL 'UnityAndroidBridge': The specified module could not be found.

 at Wikitude.AndroidPlatformBridge.UnityAndroidBindings_InitializeCSharpFunctions (System.IntPtr csharpFunctions) [0x00000] in <00000000000000000000000000000000>:0

 at Wikitude.TrackerManager.Init () [0x00000] in <00000000000000000000000000000000>:0

 at Wikitude.WikitudeCamera.Start () [0x00000] in <00000000000000000000000000000000>:0

 Wikitude.TrackerManager:Init()

    Wikitude.WikitudeCamera:Start()    

 (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

2019-12-18 13:43:08.595 25682-25738/com.example.unityandroid E/Unity: DllNotFoundException: Unable to load DLL 'UnityAndroidBridge': The specified module could not be found.

 at Wikitude.AndroidPlatformBridge.UnityAndroidBindings_SetCameraResolution (System.Int32 resolutionMode) [0x00000] in <00000000000000000000000000000000>:0

      at Wikitude.WikitudeCamera.Start () [0x00000] in <00000000000000000000000000000000>:0  

 (Filename: currently not available on il2cpp Line: -1)

2019-12-18 13:43:08.599 25682-25738/com.example.unityandroid E/Unity: NullReferenceException: Object reference not set to an instance of an object.

      at Wikitude.WikitudeCamera.Update () [0x00000] in <00000000000000000000000000000000>:0 

 (Filename: currently not available on il2cpp Line: -1)

2019-12-18 13:43:08.608 25682-25738/com.example.unityandroid I/chatty: uid=10341(com.example.unityandroid) UnityMain identical 1 line

2019-12-18 13:43:08.611 25682-25738/com.example.unityandroid E/Unity: NullReferenceException: Object reference not set to an instance of an object.

 at Wikitude.WikitudeCamera.Update () [0x00000] in <00000000000000000000000000000000>:0

 (Filename: currently not available on il2cpp Line: -1)

2019-12-18 13:43:08.618 25682-25738/com.example.unityandroid E/Unity: NullReferenceException: Object reference not set to an instance of an object.

      at Wikitude.WikitudeCamera.Update () [0x00000] in <00000000000000000000000000000000>:0  

 (Filename: currently not available on il2cpp Line: -1)

2019-12-18 13:43:08.806 25682-25738/com.example.unityandroid I/chatty: uid=10341(com.example.unityandroid) UnityMain identical 12 lines

2019-12-18 13:43:08.822 25682-25738/com.example.unityandroid E/Unity: NullReferenceException: Object reference not set to an instance of an object.

 at Wikitude.WikitudeCamera.Update () [0x00000] in <00000000000000000000000000000000>:0 

Login or Signup to post a comment