Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDK not seems not compatible #107

Open
coxfilur opened this issue Sep 9, 2022 · 5 comments
Open

NDK not seems not compatible #107

coxfilur opened this issue Sep 9, 2022 · 5 comments

Comments

@coxfilur
Copy link

coxfilur commented Sep 9, 2022

ERROR: /Users/lichunyu/work/djinni-main/WORKSPACE:13:23: fetching android_ndk_repository rule //external:androidndk: java.io.IOException: Could not read RELEASE.TXT in Android NDK: /Users/lichunyu/Library/Android/sdk/ndk/RELEASE.TXT (No such file or directory) Unable to read the Android NDK at /Users/lichunyu/Library/Android/sdk/ndk, the path may be invalid. Is the path in android_ndk_repository() or ANDROID_NDK_HOME set correctly? If the path is correct, the contents in the Android NDK directory may have been modified.

My ndk version:(in /Users/lichunyu/Library/Android/sdk/ndk)
21.3.6528147 21.4.7075529

@li-feng-sc
Copy link
Contributor

I just tested and it works for me. My $ANDROID_NDK_HOME is "~/Library/Android/sdk/ndk/21.3.6528147"

@li-feng-sc
Copy link
Contributor

Also ndk in this repo is only used for building the android example app. You can use any android sdk/ndk version to build your own app.

@cucbin
Copy link

cucbin commented Nov 14, 2022

did you use Bazel to build? It seem Bazel error. you can edit your WORKSPACE and locate the NDK path to android_ndk_repository() like:
android_ndk_repository(name = "androidndk", path = "/path/to/ndk", api_level = 21)

or, the value can be omitted if ANDROID_NDK_HOME environment variable is set.

@floriansegginger
Copy link

If the NDK is only used to build the Android example app, why is it part of the build step for Djinni? It just adds an unnecessary dependency to users of the library who might just need to generate code with Djinni without Android support.

@li-feng-sc
Copy link
Contributor

@floriansegginger you are absolutely right. I think the reason this hasn't bothered us at Snap is because the main purpose of using Djinni is to support Android and iOS development so pretty much all developers already have NDK installed. But on the other hand, the Java support in Djinni is not really tied to Android so NDK does not have to be a hard dependency. When I have some time, I'll try if I could remove this dependency. In the mean time, if you want to open a PR to fix this, I'm happy to review and merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants