JavaVTK Example Android Black Screen

Hi,

I tested the JavaVTK example with 8.2 and it works as expected while I got black screen with 9.3 and also with the latest master. VTK was build with the NDK version 25.1.8937393, ABI arm64-v8a, API 27, toolchain 25.1.8937393/build/cmake/android.toolchain.cmake and the compiler 25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++. Am I doing something wrong? As I said, it works with 8.2.

Best,
Don

Hey friend, you and I have encountered the same problem. When running and entering the program, there will be a black screen, but the project can only be rendered normally after touching the screen.
I hope the official can help us

I have relevant videos here to demonstrate this bug

I can also confirm experiencing a black screen when testing the JavaVTK example with version 9.3.

Hi Lancer,

I was not even able to get rid of the black screen after the interaction. How did you build VTK 9.3 (NDK, ABI, API, Compiler,…)?

Regards,
Don

Friend, I’ll tell you the detailed configuration tomorrow

VTK compilation Module:
System : Ubuntu20.04 (you can use the [VMware Workstation Pro])
CMake : 3.27.6-linux-x86_64 (use ninja generator compiler)
VTK CMake : VTK_ANDROID_BUILD[√] VTK_OPENGL_USE_GLES[√]
NDK : r21e
ABI : armeabi-v7a

VTK integration Module:
IDE:Android Studio : 2022.3.1 Patch 2
JDK : 17
NDK : r21e
CMake:3.22.1
Gradle Plugin : 8.1.2
Gradle : 8.0

Thank you for the info. I tried with the following configuration, but were not able to get rid of black screen after the interaction:

Did you try with arm64-v8a, since armeabi-v7a is an old 32-bit arhitecture?

As I have already said, 8.2 is working.

The version of VTK I am using is 9.3.0.rc1
And I have tried the vtk compilation of arm64-v8a version and it has been successful

Before compiling vtk9.3, you may need to make some configurations in the Ubuntu system, including environment variables, installation of the g++compiler, etc. I basically send error messages to ChatGPT or Google to search for answers. By the way, what are the compilation configurations used for your vtk8.2 and the Android studio version NDK version used for publishing, etc…

I built 8.2 with the same configuration as I posted for 9.3.

Android build configurator:

Hi brother, I think we can add a contact information and study this together

Yet, I wrote you a private message.

Friend, have you finally solved your problem?

Friend, although I can run the dynamic library of VTK9.3 normally, the final generated APK package file will be very large. In contrast, the static library of VTK9.3 cannot run at all. I guess it may be due to the official static library link not being done properly here. I hope the official can reconsider

@mwestphal