WalkerKnapp / devolay

A Java binding for the Newtek NDI(tm) SDK.
Apache License 2.0
54 stars 17 forks source link

Android Build #27

Closed triggerfinger-debug closed 3 months ago

triggerfinger-debug commented 2 years ago

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?

WalkerKnapp commented 2 years ago

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

rxnh8255 commented 2 years ago

I have the same crashes in my project.

edsonlb commented 2 years ago

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?

rxnh8255 commented 2 years ago

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.

SmartSystemElectronics commented 1 year ago

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

egold555 commented 1 year ago

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.

WalkerKnapp commented 3 months ago

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!

kmod-midori commented 3 months ago

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)