windows 7 ndk in eclipse Indigo throwing not valid win32 - android

I am having a problem I can run ndk outside of eclipse but not from the workspace folder. I get an error of a missing file.
Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists or that its path is correct
/cygdrive/c/Users/ALEXDEV/android-ndk-r8b/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
I am wondering if when I create the android project one of the files isnt copied. But when I run it inside eclipse
I get this error. I followed this tutorial
http://mobilepearls.com/labs/ndk-builder-in-eclipse/
The error I got when running ndk in eclipse was as follows
"C:\Users\ALEXDEV\android-ndk-r8b\ndk-build" (in directory "C:\Users\ALEXDEV\workspace\Image"): CreateProcess error=193, %1 is not a valid Win32 application
What do you suggest that I did wrong and what method do you propose will fix this problem.
I am using Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 2
I am following this tutorial
http://tools.android.com/recent/usingthendkplugin
I am using this upload
Indigo - http://download.eclipse.org/releases/indigo
Instead of dowloading a package from the link I chose the option add but I used archieve.
Packages can be downloaded straight from eclipse. Here is the link that I used to download
the package http://www.eclipse.org/cdt/downloads.php
I then download this version of the ndk
I got the ndk examples working so the problem is solved.

With ndk r8b, you don't need cygwin at all. Set the build command as ndk-build.cmd
Note that your tutorial is outdated. The recent versions of ADT plugin allow you to simply click "add native support" to a Java project.

Related

Qt for android: project error cannot run target compiler

I compile for the first time "toutchinteraction.pro" from Qt for android examples.
I installed sdk manager from android studio, all my android setup are well configured except for openssls which is optional (I didn't install it).
When I open the example project from Qt creator, I have the following error: Project ERROR: Cannot run target compiler 'C:\Program Files (x86)\Android\android-sdk\ndk\21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++
Do you think that the white space inside the path makes this issue?
I can confirm you that it is the whitespace, I had the same issue, tried everything, and in the end installing the SDK and NDK in a path without whitespace solved the problem

Building QT Android app: ..i686-linux-android-g++: No such file or directory

I am building the first application in QT Creator, and came to the step I don't understand.
I have Mac, Android Studio is installed, Android SDK and NDK are installed using Studio. PATH to $ANDROID_NDK_ROOT is set manually.
My application compiles for Desktop without problems but trying to compile it for Android gives me this error:
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-g++: No such file or directory
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
Project ERROR: Cannot run target compiler '/Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++'. Output:
===================
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
===================
Maybe you forgot to setup the environment?
Error while parsing file /Users/drob/OneDrive/DEVEL/PROJECTS/QT_Projects/btchat/btchat.pro. Giving up.
I found that I should do the following steps, but I am scared to completely crash the system:
1. Install G++ (but what is this and how to install it on Mac properly)
2. Create G++ toolchain using NDK script (unfortunately too complicated for me. Some guide will be welcome)
What I also found out is that normally QT for Mac uses Clang compiler from XCode that I also have got installed. Should I somehow make QT Creator use that compiler instead of G++?
Sorry for questions that might sound silly but I am really lost at that point
Using the trial and error method I found that it is practically impossible to make NDK r10e work with QT 5.9. I ended up installing latest NDK and latest QT (5.12.6)

Android Eclipse cannot find program "sh " in PATH

I'm trying to run program using android ndk. Eclipse shows problem "Program "sh" not found in PATH C/C++ Problem". I've already made a reference to ndk folder in path. What is "sh"?
I had the same error on Windows. Setting the correct path for Android NDK in the Eclipse Preferences->Android->NDK fixed it.
In my case, the project works fine after removing the project from the workspace and import again. I don't know why:(
I had this problem with NDK, probably you have spaces defining the path of your sdk.
Check if you have specified the NDK path as
C:\Program Files\Android\android-ndk
avoid the "spaces", so change to:
C:\Progra~1\Android\android-ndk
Read : The Android emulator is not starting, showing "invalid command-line parameter" (applies for SDK & NDK)

Cannot run program "sh": Launching failed

I downloaded cygwin and install. Then copy the ndk file to android folder. The path is C:\Program Files\Android\android-ndk-r9b then add this path to systemVaraible. Then choosen ndk location in Eclipse preference. Then right click the project, select AndroidToold->Add Native supportI'm getting this error: Build of configuration Default for project ImageTargets
(Cannot run program "sh": Launching failed)
Then open the cygwin terminal type $ cd /cygdrive/c/Program Files/Android/androi-ndk-r9b/samples/san-angles ndk-build
Below error i'm getting. Where i made mistake?
-bash: cd: /cygdrive/c/Program: No such file or directory
I had the same error on Windows and it was resolved by setting the correct path for Android NDK in the Eclipse workpace (Preferences->Android->NDK).
You don't need cygwin to work with NDK r9b on Windows. But whether you have cygwin installed or not, you should avoid spaces in the file names for your Android NDK or SDK installations. The easy fix would be to specify the path using short name, e.g. C:\Progra~1\Android\android-ndk-r9b.
See more at The Android emulator is not starting, showing "invalid command-line parameter", or Using Proguard for Android in Eclipse got Error.
the "Cannot run program "sh": Launching failed" may come from a bad eclipse configuration.
You can try to reset C/C++ Build configuration, inside your project settings:
Also on Windows, like Alex Cohn said, you don't need cygwin and can directly launch "ndk-build.cmd" script that is inside your NDK installation folder.

Unable to generate apk using Eclipse

Very new to Android development and am running into some issues with basic stuff. I've been using Eclipse to build my projects. Recently I upgraded to the latest version of the eclipse ADT plug-in v15.0.0 and in the process also had to upgrade my Android SDK to v15.
Now when I build my application there is no apk file generated. A dialog box with a progress bar appears with messages indicating that something is getting built. There are no errors but in the end I do not see an apk file in the bin directory or any other directory under project.
I have tried the following
- deleted project from Eclipse and re-imported the project
- deleted project from Eclipse and made a new project from exisisting source
- deleted project from Eclipse, removed code from workspace, re-synced to code from server and created a new project from existing source
To make things simple I tried building the hello-jni example that ships with the NDK and observed the same issue; dialog shows build with no errors but there is no apk. The suggestions in the threads below did not fix the issue for me.
Android Eclipse - Could not find *.apk
Unable to run Android app, Could not find .apk issue in eclipse
Details about my set up below
Java 6 Update 27
JDK 6 Update 27
Eclipse 3.7.1
ADT Plugin v15
Android SDK v15
Win 7 (32-bit)
The only thought I have is to uninstall and then reinstall the SDK. Seemed like it might be worth checking with the more experienced folks before I did that. Please let me know if you have any suggestions.
Try cleaning the project and then running
android update project --name <project_name> --target <target_ID>
--path <path_to_your_project>
from the command line. Then try building again.
Also, go to your project properties in Eclipse and go to 'Builders' and make sure that you see 'Android Package Builder' as one of the builders listed there..

Categories

Resources