Skip to content

Adding/Compiling/Linking Halide for Android Studio on Windows #4590

@guayabas

Description

@guayabas

Hello,
I have been trying to add Halide into an Android app I am creating. Can you help me pointing me the best practice to add Halide into a native code of Android Studio.

Some clarifications of what I have been trying so far:

  1. Downloaded the pre-compiled version of Halide from https://github.com/halide/Halide/releases. I am able to build and link fine in my Android app for arm64-v8 but once the app is running I am getting the error

libc++.so is too small to be an ELF executable

from Java code.

  1. I added Halide directory from https://github.com/halide/Halide and tried to compile it directly in my Android Studio project with the extra gradle file

externalNativeBuild {
cmake {
targets 'Halide'
}
}

but the Android Studio IDE hangs. I am able to use other libraries that have standard CMakeLists.txt files.

  1. Tried the app folder from the Halide repo (https://github.com/halide/Halide/tree/master/apps) that contains the projects HelloAndroid, HelloAndroidGL, HelloAndroidCamera2 but I am getting the following error

image

I am not really experienced with Android Studio IDE but I do have understanding of CMake and Compiling using Visual Studio/gcc/etc. so any help about how to incorporate Halide will be great

Last thing, my setup is the following:

  • OS - Windows 10
  • Android Studio - Version 3.5.3
  • Phones to test - Samsung Galaxy S10+, Google Pixel 2XL
  • NDK - Version 21.0.6113669

Thanks (:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions