devolay icon indicating copy to clipboard operation
devolay copied to clipboard

Android Build

Open triggerfinger-debug opened this issue 3 years ago • 6 comments

Hello, I am trying to get devolay working on Android. In build.gradle(:app) I have included

    implementation('me.walkerknapp:devolay:2.1.0') {
        artifact {
            name = "devolay"
            type = "aar"
        }
    }

Builds with no errors.

For quickly testing, in MainActivity.java I simply have:

package com.example.ndi;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import me.walkerknapp.devolay.Devolay;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Devolay.loadLibraries();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

When run, app immediately crashes with the following reason: Caused by: java.lang.IllegalStateException: The NDI(tm) SDK libraries were not found.

I thought the Android Build includes the NDI SDK? Am I missing something?

triggerfinger-debug avatar Jun 08 '22 17:06 triggerfinger-debug

Thanks for opening an issue! Sorry for only getting to it now. I have replicated the issue and will see what's going on

WalkerKnapp avatar Jun 14 '22 02:06 WalkerKnapp

I have the same crashes in my project.

rxnh8255 avatar Aug 11 '22 06:08 rxnh8255

Yes, I'm having also the same problem, but this is because from the Devolay Release v2.0.2 to the Devolay Release v2.1.0 they removed the folder "natives/android/arm64-v8a", so it is not generating for Android anymore. And if you try to get other .SO file, it will say: " .SO is for EM_X86_64 instead of EM_AARCH64". Did someone solved this issue on Android ARM64?

edsonlb avatar Sep 01 '22 15:09 edsonlb

Yes, I'm having also the same problem, but this is because from the Devolay Release v2.0.2 to the Devolay Release v2.1.0 they removed the folder "natives/android/arm64-v8a", so it is not generating for Android anymore. And if you try to get other .SO file, it will say: " .SO is for EM_X86_64 instead of EM_AARCH64". Did someone solved this issue on Android ARM64?

I compiled a SO file through JNI, Reference the official libndi.so and .H files,I can send&receive data. But i'm confused how to show in android by receive the camera data.

rxnh8255 avatar Sep 02 '22 03:09 rxnh8255

Any solution do you have? @rxnh8255 @WalkerKnapp @edsonlb @triggerfinger-debug

SmartSystemElectronics avatar Jun 20 '23 08:06 SmartSystemElectronics

Any updates on this? Facing the same issue with trying to run this on Android.

I have tried following the compiling steps for the NDI SDK for android, with no success.

egold555 avatar Aug 25 '23 07:08 egold555

I believe this should now be fixed with the recent revamp to the build process. All artifacts for Android should now appear in the AAR file for release 2.1.1 without issues. Please feel free to reopen this issue if it crops up again!

Thanks for your patience!

WalkerKnapp avatar Jul 14 '24 05:07 WalkerKnapp

They are here, but no longer load, are we getting into some C++ rabbit hole?

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZTISt12length_error" referenced by "/data/app/~~6Ldw-5YrDMdI5jzlr9A8CQ==/de.daubli.ndimonitor-IoInKvBN14OxSt831zaX5g==/base.apk!/lib/arm64-v8a/libdevolay-natives.so"...
  at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
  at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
  at java.lang.System.loadLibrary(System.java:1661)
  at me.walkerknapp.devolay.Devolay.<clinit>(Devolay.java:42)

kmod-midori avatar Jul 15 '24 04:07 kmod-midori