Java Question SLC .aar lib and .so file

warwound

Expert
Licensed User
Longtime User
I'm wrapping part of the GoogleVR SDK and have a problem with the VrVideoView class:
https://developers.google.com/vr/android/reference/com/google/vr/sdk/widgets/video/VrVideoView

I started with the working demo project and created a wrapper.
The demo depends on 3 .aar libs from the GoogleVR SDK: common.aar, commonwidget.aar and videowidget.aar.
videowidget.aar contains a native .so library file and i'm unable to get this library to compile into my .apk (i'm using SLC to compile my library), as soon as i start my app i get an exception such as:


The .so file is located at:

videowidget.aar\jni\armeabi-v7a\libpano_video_renderer.so

My additional libraries folder contains the 3 required .aar files, and my Main activity contains:
B4X:
	#AdditionalJar: common.aar
	#AdditionalJar: commonwidget.aar
	#AdditionalJar: videowidget.aar

Also, my wrapper class contains:
B4X:
@BA.DependsOn(values={
        "common.aar",
        "commonwidget.aar",
        "videowidget.aar"
})

Looking at my .apk file using 7Zip i see various resources which belong to the varous .aar file but no .so file.

Any idea what the problem is?

Thanks.
 

warwound

Expert
Licensed User
Longtime User
Thinking about this...

Shall i create a feature request asking that the IDE fully supports .aar files - including compiling JNI files into the .apk?
 

moster67

Expert
Licensed User
Longtime User
The IDE doesn't do anything with the jni folder from the aar file.

You can create another jar with no code and only a folder named lib that holds the other three folders (from the aar).

Could this procedure be explained?
How do I create a jar with no code?
 

warwound

Expert
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…