Giter Site home page Giter Site logo

Comments (7)

munirjojoverge avatar munirjojoverge commented on April 27, 2024 1

@jiuqiant
I changed directly the WORKSPACE but unfortunately I still get the same error:
ERROR: /home/munir/Documents/workspace/mediapipe-master/mediapipe/java/com/google/mediapipe/framework/BUILD:34:1: no such package '@androidsdk//com.android.support': BUILD file not found on package path and referenced by '//mediapipe/java/com/google/mediapipe/framework:android_framework_no_mff'

Any other idea

from mediapipe.

jiuqiant avatar jiuqiant commented on April 27, 2024

@munirjojoverge It seems that you don't setup Android SDK and NDK correctly for MediaPipe. Please follow the instructions to set $ANDROID_HOME and $ANDROID_NDK_HOME. Then, try the build command again. Let me know if it still doesn't work. Thanks.

from mediapipe.

munirjojoverge avatar munirjojoverge commented on April 27, 2024

@jiuqiant THanks for the prompt response. I did follow the setup instructions and I still get the same error:
ERROR: /home/munir/Documents/workspace/mediapipe-master/WORKSPACE:191:1: no such package '@androidsdk//': Either the path attribute of android_sdk_repository or the ANDROID_HOME environment variable must be set. and referenced by '//external:android/sdk'

At the end of my WORSPACE file (on mediapipe folder) I have

You may run setup_android.sh to install Android SDK and NDK.

android_ndk_repository(
name = "androidndk",
)

android_sdk_repository(
name = "androidsdk",
)

Could this be somehow the issue?
The other comment I have is that I have a "base" conda environment that is "sourced" automatically.
I also added on .bashrc the following lines.

export ANDROID=~/Android
export ANDROID_HOME=$ANDROID/Sdk
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle

export PATH=$PATH:$ANDROID_HOME/tools
export PATH="$PATH:$HOME/bin"
source /usr/local/lib/bazel/bin/bazel-complete.bash

from mediapipe.

jiuqiant avatar jiuqiant commented on April 27, 2024

Seems like the conda environment hides the environment variables? It surprises me.
Another solution is to manually add the SDK and NDK path into the WORKSPACE file.

 android_ndk_repository(
     name = "androidndk",
+    path = "/path/to/Android/Sdk",
 )

 android_sdk_repository(
     name = "androidsdk",
+    path = "/path/to/Android/Ndk",
 )

Let me know if this works. Thanks.

from mediapipe.

jiuqiant avatar jiuqiant commented on April 27, 2024

@munirjojoverge Seems like Bazel can find your Android SDK and NDK. If the SDK can't be found, Bazel will complain that "no such package '@androidsdk//': Either the path attribute of android_sdk_repository or the ANDROID_HOME environment variable must be set. and referenced by '//external:android/sdk'".

The issue seems to be missing required packages in your Android SDK. MediaPipe needs the SDK to have the following packages:

  • build-tools;28.0.3
  • platform-tools
  • platforms;android-28
  • extras;android;m2repository

If you don't want to touch the existing SDK and NDK, please try our script to download and install the required Android SDK and NDK packages into a separate directory.

$ git checkout .
$ chmod +x setup_android_sdk_and_ndk.sh 
$./setup_android_sdk_and_ndk.sh 

from mediapipe.

jiuqiant avatar jiuqiant commented on April 27, 2024

@munirjojoverge I went through the steps to build the Android demos with the SDK and NDK from Android Studio 3.4.2. I believe you need to download and install the following packages:

  • SDK Build-Tools 28.0.3
  • SDK Platform 28.6
  • Android Supporting Repository

Attached are the screenshots that may help you locate those packages quickly.

Screen Shot 2019-08-01 at 11 07 11 PM

Screen Shot 2019-08-01 at 11 07 38 PM

Screen Shot 2019-08-01 at 11 07 23 PM

from mediapipe.

jiuqiant avatar jiuqiant commented on April 27, 2024

@munirjojoverge, can you pull our latest version and retry the build command with Android SDK 29 and NDK 17c (or above)? Let me know if it doesn't work.

from mediapipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.