sceneform-android-sdk icon indicating copy to clipboard operation
sceneform-android-sdk copied to clipboard

Failed to call function: ArSession_createImplementation

Open RavindraVirat opened this issue 8 years ago • 10 comments

I got this issue when I am launching Sceneform activity -

E/StandardArFragment: Exception: com.google.ar.core.exceptions.UnavailableException com.google.ar.core.exceptions.FatalException: Application manifest must contain meta-data com.google.ar.core.min_apk_version

For the exception above I mentioned meta-data in manifest - meta-data android:name="com.google.ar.core.min_apk_version" android:value="24"

then I am getting below exception - [blaze-out/android-arm64-v8a-opt/genfiles/third_party/arcore/ar/core/android/arcore_c_shim_function_impls.inc:463] CHECK failed: expression='"false"' Failed to call function: ArSession_createImplementation, this function version: 171127000 is higher than requested min apk version.

Please guide the solution here.

RavindraVirat avatar Jul 13 '18 05:07 RavindraVirat

You should be able to remove the min_apk_version line. If that doesn't work, can you share the list of dependencies in your app build.gradle file?

gstanlo avatar Jul 13 '18 18:07 gstanlo

Thanks for reply.

Scenform is working properly as a separate app what I downloaded from GitHub.

In the same app I have put hello_ar_java related code also for that too I am getting the same error.

Now I put all sceneform code to my another application, after putting all when I am trying to run then I am getting the issues I mentioned above.

I am using compileSDk version and targetsdkvrsion as 27, and dependency is 27.1.1

RavindraVirat avatar Jul 14 '18 06:07 RavindraVirat

Can you look at your AndroidManifest.xml and compare it to the working sample? The arcore.aar does merge in additional metadata when building. You should not need to set min_apk_version (in fact, it will probably break the app).

The important entries are in the <manifest> element:

    <!-- Always needed for AR. -->
    <uses-permission android:name="android.permission.CAMERA" />
    <!-- This tag indicates that this application requires ARCore. This results in the application
        only being visible in the Google Play Store on devices that support ARCore. -->
    <uses-feature android:name="android.hardware.camera.ar" android:required="true"/>

And in the <application> element:

        <!-- This tag indicates that this application requires ARCore. This results in the
            application only being visible in the Google Play Store on devices that support
            ARCore. -->
        <meta-data android:name="com.google.ar.core" android:value="required" />

claywilkinson avatar Jul 16 '18 19:07 claywilkinson

I tried this but still same error. I think arcore aar file is not merging properly, could please guide some steps to check whether .aar file is merged and if still not working then can we have some manual steps for merging.

RavindraVirat avatar Jul 17 '18 09:07 RavindraVirat

Are you still receiving the error Failed to call function: ArSession_createImplementation, this function version: 171127000 is higher than requested min apk version. ?

gstanlo avatar Jul 17 '18 21:07 gstanlo

Yes I am getting that error and if I remove min_apk line from manifest then it gives below error -

E/StandardArFragment: Exception: com.google.ar.core.exceptions.UnavailableException com.google.ar.core.exceptions.FatalException: Application manifest must contain meta-data com.google.ar.core.min_apk_version

RavindraVirat avatar Jul 18 '18 04:07 RavindraVirat

@RavindraVirat - this thread has become idle. Did you resolve your issue? Can this issue be closed? Thanks!

claywilkinson avatar Aug 22 '18 19:08 claywilkinson

Hi,

Issue still exist.

RavindraVirat avatar Aug 23 '18 11:08 RavindraVirat

Can you please check your project build setup? This looks like a build issue. You should not need to set min_apk_version.

abramyan avatar Sep 28 '18 16:09 abramyan

@RavindraVirat were you able to resolve your build issue? Please make sure to have the latest ARCore and Sceneform releases.

abramyan avatar Oct 02 '18 17:10 abramyan