google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://mediapipe.dev
Apache License 2.0
26.8k stars 5.09k forks source link

Android: Being asked to install a previous version of NDK #801

Closed harsha-main closed 4 years ago

harsha-main commented 4 years ago

I tried to run a hand tracking android app by following the official documentation (generating aar file, assets and adding them to the project). When I try to run the project, I was given this message

No version of NDK matched the requested version 20.0.5594570. Versions available locally: 21.3.6528147

In case this is a fault from my end, I need to know if maybe I'm doing something wrong here, as the example of multi hand recognition had run without any such message.

jiuqiant commented 4 years ago

Can you try the example repo by doing git clone https://github.com/jiuqiant/mediapipe_multi_hands_tracking_aar_example.git?

harsha-main commented 4 years ago

@jiuqiant Thank you very much for responding. Yes, I did run that and it works very fine, the problem(and other issues that I reported recently) is only when I try to compile things from scratch on my own. Edit: Also, I need to mention that this Mutihand tracking module gives me a low framerate, too laggy when I use a budget device.

jiuqiant commented 4 years ago

For your first question, which Android NDK do you point mediapipe to, v20.0.5594570 or v21.3.6528147? You probably do it either via setting ANDROID_NDK_HOME or putting the ndk path at https://github.com/google/mediapipe/blob/master/WORKSPACE#L195.

harsha-main commented 4 years ago

@jiuqiant My ANDROID_NDK_HOME in my .bashrc points to the path to v21.3.6528147, which was the only installed NDK at the time for me. These NDKs take up close to 1GB of space, so I felt it's odd that mediapipe would ask me to have an older NDK.

jiuqiant commented 4 years ago

Seems to be a gradle related issue. Many gradle users are complaining about this in https://github.com/gradle/gradle/issues/12440.

harsha-main commented 4 years ago

Thank you