I'm following the steps (Mediapipe Android) to build an Android application(Objectdetection3d) using Mediapipe,I've successfully completed the installation procedure for Window's Subsystem for Linux (WSL) using Ubuntu 20.04.3
I'm now trying to build the objectdetection3d example from the Mediapipe repository on WSL by following these Mediapipe instructions.
I am specifying $ANDROID_HOME and $ANDROID_NDK_HOME with
export ANDROID_HOME=/mnt/c/Users/[USER]/AppData/Local/Android/Sdk
export ANDROID_NDK_HOME=/mnt/c/Users/[USER]/AppData/Local/Android/Sdk/ndk/21.4.7075529
Then, I am building the objectdetection example with
bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d:objectdetection3d'
And I get this error :
Error
what should i do for solution ?
I tried to do what the instructions say here: https://github.com/rhdunn/espeak#android But as I am in Win10, and use Android Studio 2.3, don't know how to do these things in Windows? (Isn't there any step-by-step instructions for windows?)
Building with Gradle
Set the location of the Android SDK:
$ export ANDROID_HOME=<path-to-the-android-sdk>
Build the project:
$ ./autogen.sh
$ ./configure --with-gradle=<path-to-gradle>
$ make apk-release
This will create an android/build/outputs/apk/espeak-release-unsigned.apk file.
I'm running following setup:
Ubuntu 13.10 64bit
Qt creator 3.0.1
Qt 5.2.1
NDK r9d 64bit
adt-bundle-linux-x86_64-20140321.zip
I managed get it compile. I started emulator before deploying the app. but instead of sending the apk to running emulator it started a new one... Qt Create went not responding for a while...new emulator got booted up and after a while Qt createor started to respond again and returned following compile output.
Also I tried to get it working on Windows 7 64bit before Ubuntu but the result was very same. Also I believe the software versions were mostly same.
17:11:12: Removing directory /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build
17:11:12: Starting: "/usr/bin/make" INSTALL_ROOT=/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build install
cp -f -R /home/rikko/android/projects/omgFrickingGosh/qml/omgFrickingGosh /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/assets/qml/
install -m 755 -p "libomgFrickingGosh.so" "/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libomgFrickingGosh.so"
17:11:13: The process "/usr/bin/make" exited normally.
Error while building/deploying project omgFrickingGosh (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
When executing step 'Deploy to Android device'
17:13:26: Elapsed time: 02:14.</code>
I actually maanged to get it runningun Windows.
Seems that most probablt the suspects are new SDK or NDK.
So the configuration that is currently working on 64bit Win 7 is followng:
JDK: jdk-7u51-windows-x64.exe
Ant: apache-ant-1.9.2-bin.zip
NDK: android-ndk-r9-windows-x86_64.zip
SDK: adt-bundle-windows-x86-20131030.zip (contains SDK manager 22.3)
Qt 5.2.1 and QtCreator 3.0.1 both from qt-opensource-windows-x86-1.5.0-2-online.exe
Contact me if you have similar problem and can't get your hands on these package versions yourself.
Today I tried PhoneGap/Cordova with Mac OS X Mavericks. Building for iOS went just fine, but building for Android wasn't without some guesswork.
I installed Android 4.2.2 via the Android SDK Manager (I had to use the older API v17 since it wasn't compatible with a newer one), added the PATH environment variables for the SDK's platform-tools and tools and thought I was ready to take off by running the command:
phonegap run android
Nevertheless, I got the following error:
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project. ERROR : executing command 'ant', make sure you have ant installed and added to your path.
The error message proved to be true as Apache Ant isn't in the path of Mac OS X Mavericks anymore.
Bulletproof solution:
Download and install Homebrew by executing following command in terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Apache Ant via Homebrew by executing
brew install ant
Run the PhoneGap build again and it should successfully compile and install your Android app.
You can install ANT through macports or homebrew.
But if you want to do without 3rd party package managers, the problem can simply be fixed by downloading the binary release from the apache ANT web site and adding the binary to your system PATH.
For example, on Mountain Lion, in ~/.bash_profile and ~/.bashrc my path was setup like this:
export ANT_HOME="/usr/share/ant"
export PATH=$PATH:$ANT_HOME/bin
So after uncompressing apache-ant-1.9.2-bin.tar.bz2 I moved the resulting directory to /usr/share/ and renamed it ant.
Simple as that, the issue is fixed.
Note Don't forget to sudo chown -R root:wheel /usr/share/ant
As an alternative to homebrew, you could download and install macports. Once you have macports, you can use:
sudo port install apache-ant
it don't needed port and brew!
because you have android sdk package.
.1 edit your .bash_profile
export ANT_HOME="[your android_sdk_path/eclipse/plugins/org.apache.ant_1.8.3.v201301120609]"
// its only my org.apache.ant version, check your org.apache.ant version
export PATH=$PATH:$ANT_HOME/bin
.2 make ant command that can executed
chmod 770 [your ANT_HOME/bin/ant]
.3 test if you see below message. that's success!
command line execute: ant
Buildfile: build.xml does not exist!
Build failed
I encountered the same issue when trying to use Cordova. Turns out I already had brew, try which brew, but it was outdated. So, I had to update it first:
Update brew: brew update
Install Apache Ant: brew install ant
In my case, I have macport installed already. I simply updated my macport:
sudo port selfupdate
sudo port upgrade outdated
Then install apache-ant:
sudo port install apache-ant
Finally, I add ant to my alias list in my .bash_profile:
alias ant='/opt/local/bin/ant'
Then you are all set.
For OSX your path needs to include /Users/yourusername
their example: /Development/adt-bundle/sdk/platform-tools
needs to be: /Users/yourusername/Development/adt-bundle/sdk/platform-tools
I have installed Cordova along with Phonegap and installed node.js in my system(ubuntu)
by using following commands:
Install Nodejs http://nodejs.org/
Install Cordova 3.0.x
$ sudo npm install -g cordova
Install Phone Gap 3.0.x
$ sudo npm install -g phonegap
Then i created project using phonegap command:
$ phonegap create hello
Trying to run into my local by using following command:
$ phonegap local run andriod
Now at first i am getting following error:
shoaib#shoaib:~/Documents/hello$ phonegap local run android
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project. /home/shoaib/.cordova/lib/android/cordova/3.0.0/bin/create: line 54: jar: command not found
This i solved by running following command:
ls -la /home/shoaib/.cordova/lib/android/cordova/3.0.0/bin
Now when i again run
$ phonegap local run andriod
I am getting below error:
root#shoaib:/home/shoaib/Documents/hello# phonegap local run android
[phonegap] compiling Android...
[error] An error occurred while building the android project. /bin/sh: 1: /home/shoaib/Documents/hello/platforms/android/cordova/build: not found
I am using Android SDK 17
and version as 4.2.2 .
Any solution for this issue?
I had a similar problem. build and run were missing along with a few other files and lib was an empty directory. Downloaded cordova-android from here extracted and copied everything from its /bin/templates/cordova/ to the project (/platforms/android/cordova/). Then I could build and install the app.
Still had to start the emulator, check the running emulator with platforms/android/cordova/lib/list-started-emulators and then pass it when installing or it would take forever to install it on an emulator.
$ platforms/android/cordova/lib/list-started-emulators
emulator-5554
$ phonegap install --emulator=emulator-5554 android
I had already installed the JDK but the same error.
To fix this I just removed the phone test project and make sure that:
Java, javac and jar where in the path
(both should work)
java -version
javac -version
jar -version
Android sdk path was properly set and JAVA_HOME environment variable was properly set.
Then I remake the project and everything worked.
Hey got the solution.
I install open jdk 6.0 and problem is resolved.