Android Studio Wikitiude Samples Error - android

I have this error when I trying to run Wikitude examples. How can I solve this.
Error:error: C:/Users/se/Desktop/wwww/Examples/SDKExamples/plugins/src/main/cpp/jni/../lib/x86/libippicv.a(jmp_icvippiMulC_32f_C1IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object
Error:error: linker command failed with exit code 1 (use -v to see invocation)

I have the same error, sorry can't add a comment as don't have enough reputation.
Error:error: /Users/alex/Projects/Android/docsign/opencv/src/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiTranspose_32s_C4IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object
This is the latest Android Studio and NDK, and I am using OpenCV,
Android Studio 3.0.1
NDK 16.0.4442984
This does not happen on my other machine which does not have NDK updated.
Update:
The guys maintaining the OpenCV for android advised me to add the following line to the CMake file in order to avoid the errors, when compiling with new NDK.
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a")
https://github.com/opencv/opencv/issues/10229#issuecomment-370326899

I've had the exact same problem, but think I have found a work-around to this problem. I think the problem lies in the newer version of NDK, so you could try to re-install it.
Go to SDK Manager and navigate to Appearance & Behavior/System Settings/Android SDK.
In the tab menu choose SDK Tools and deselect the NDK checkbox -> Apply. After uninstalling -> mark NDK and Apply again.
Also, after installing NDK, remove the build folder in your project (only the one with the intermediates folder in it).
Your errors will still occur when you Make the project, but your code will run when you hit Debug.
This work-around worked for me, so I hope this works for you too.

The wikitude Android samples will not currently build with Android NDK 16. You need to downgrade your Android NDK to 14.
Alternatively you can just remove the plugins features from the build. To do this remove the include for ':plugins' from the settings.gradle file and the lines referencing ':plugins' in the main build.gradle.

Related

When rebuilding tensorflow for android I'm getting a fatal error: 'stdlib.h' file not found

In Ubuntu 16.04, when running an Android Tensorflow TFDetect implementation using my protobuf file, I received an error stating "No OpKernel was registered to support Op 'ceil'". I had to modify the mobile build to include the proper .cc files and I then proceeded to run the following command to build the jar after rebuilding Tensorflow:
bazel build -c opt
//tensorflow/contrib/android:libtensorflow_inference.so
--crosstool_top=//external:android/crosstool --host_crosstool_top=#bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a
I then receive the error stating that the build was not complete due to stdlib.h missing:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:10:
fatal error: 'stdlib.h' file not found
I see many others being told to use the prebuilt binaries, but this will not work for me as I need some additional kernels that are stripped for mobile.
Anyone have any ideas as to how I can build the necessary android jar?
Well I found the issue. At the following link below it states that bazel is not supported by NDK version 16. I had originally installed 14b, but at one point when I opened my project in Android Studio, it asked to update the NDK and I upgraded. When I happened to be troubleshooting this issue I noticed that it was version 16 and then ended up removing that and installing version 14. After rebuilding all source and then performing the above call to bazel, everything went through smoothly. Stupid mistake on my part.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md

crystax: sqlite/3/Android.mk: Cannot find module with tag 'openssl/1.0.2h'

I'm trying to build an Android project with crystax ndk within Android Studio, but I got the following error message:
Android NDK: /.../crystax-ndk-10.3.2/sources/sqlite/3/Android.mk: Cannot find module with tag 'openssl/1.0.2h' in import path
I searched the crystax-ndk-10.3.2 folder, and found there is a sources/openssl/1.0.1p folder instead of 1.0.2h.
It looks like sqlite/3 is refering to a 'wrong' version of openssl. But strangely there isn't any reference to openssl in sqlite/3/Android.mk file at all. And I really have no clue why this is happening as I downloaded a brand new crystax-ndk-10.3.2 copy and didn't alter any bit of it. I googled crystax sqlite cannot find openssl and it seems no others are having this problem.
Could anyone please help me find out what's wrong? The following are some details of configurations:
Gradle version: 2.1.2
Android Studio: 2.2.3
crystax-ndk : 10.3.2
OS : macOS Sierra 10.12.2
Special thanks to Alex, I finally figured out what's going wrong.
Basically, after extracting the CrystaX package, one also needs to build openssl, and copy built files into .../sources/openssl/ folder.
I used the following steps from this instruction to solve it:
git clone https://github.com/crystax/android-vendor-openssl.git
cd crystax-ndk-$CRYSTAX_NDK_VERSION
./build/tools/build-target-openssl.sh ../android-vendor-openssl/
cp sources/openssl/1.0.1p/Android.mk sources/openssl/$OPENSSL_VERSION/Android.mk

Error executing aapt: Return code 132 problems

Since updating my Android SDK about a month ago I've had endless problems leaving me with a non-functional development environment.
Initially the problem was with the v7-appcompat support library which threw up about 100 errors relating to various resources. It was fairly obvious they were resources relating to Android v5 and a quick search on Stack Overflow meant I realised the v7-appcompat library was targeting API 19. Changing the relevant settings to target API 21 fixed the resource errors.
However, the problem I've had since then is any attempt to build the library project quickly finishes with...
Error executing aapt: Return code 132
...and the library project isn't built correctly.
My original setup was with Eclipse Kepler but then I tried Android Studio v1.0.1 (same aapt error code) and today I installed Eclipse Luna to a separate directory from Kepler AND a fresh installation of ADT and SDK. Each version of Eclipse also have their own workspaces.
So basically I have two versions of Eclipse (each with their own ADT / SDK setups and workspaces) and Android Studio with its own directory structure and all three exhibit the same problem.
The question is, how do I go about diagnosing this issue? The common denominator is obviously an aapt issue but I have no idea how to fix it.
I'm running on a Debian Wheezy (32-bit) setup and I've got Java 1.7 installed correctly (as recommended).
There seems to be an issue with aapt on some 32 bit systems. It throws an error 132 on app:processDebugResources which is when aapt is 'crunching' png files ready for inclusion in the apk package. You can see more details at https://code.google.com/p/android/issues/detail?id=75110
Some people have reported that 'fixing' the offending png files (e.g. by opening in Gimp and saving) sorts the problem. When they are 'built in' to appcompat it's much harder to do of course.
Before getting into detail can you just say if you are indeed running on a 32 bit processor, and if so which one? use lscpu to find out.
OK, if anyone is interested, here is a work around so you can use your old laptop to build apps with Android Studio. Basically you strip all the png files in the appcompat-v7 library and then do a build using two versions of aapt. Yuk.
Find the appcompat-v7.aar which will be somewhere like ~/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/22.0.0
Extract it (it's a zip file really) to a temporary directory
Strip all the png files: find . -name "*.png" -exec mogrify -strip {} \;
Pack the files back up again: pushd appcompat-v7-22.0.0; zip -r ../appcompat-v7-22.0.0.aar; popd
Move the new aar file to replace the original (that may be enough to get a good build but it wasn't for me)
Now find an old version of aapt (I went to https://dl-ssl.google.com/android/repository/build-tools_r17-linux.zip)
Copy the version of aapt from the zip you've just picked up into the Android/Sdk/build-tools directory as aapt-17 or whatever
Rename the original aapt to aapt-0
Alternate between the two versions of aapt (e.g. ln -sf aapt-17 aapt) and you should find you can get a good build. One version will fail in one place, the other in another, getting you past all the bumps.
I know it stinks but I was desperate!!
Here's what I did, which is enough to get a successful build. Inspired by peterthevicar's answer.
downgrade sdk to 19.1.0, you can install it from studio and then change buildToolsVersion in build.gradle
rename aapt to aapt.bin and put a shell script in its place that intercepts just the png crunch (args: s -i infile -o outfile) and does a simple cp instead. would paste it here but SO's syntax highlighting suuuucks

How to solve the Dalvik error in adding libs to another project to make a Lite version of my Android app?

In my app, I have to have two version: Full and Lite.
I am following these tutorials:
http://bitowl.wordpress.com/2011/07/06/tutorial-how-to-make-full-and-lite-versions/
http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/
So, I build my full version, and make it a library. This full version uses some other libs, needed to some components.
Then, I create a new project and added the lib created. The problem is when I try to run my lite version, eclipse gives this error:
[2012-12-13 13:58:13 - <app> Lite] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lnet/simonvt/timepicker/R$attr;
Conversion to Dalvik format failed with error 1
The simonvt/timepicker is one of the libs that I use in my full version.
How can I fix this?
Thank you!
Do the following:
Right-click on your project and choose Build Path -> Configure Build Path,
then go to order and export section
If simonvt/timepicker has a checkmark against it, then deselect it.
I believe that the problem is that the library project is already added and you might be trying to add it again.

What could be causing the "OutputPath property is not set for project ProjectName.csproj" error in my MonoDevelop project

On Windows 7 (64 bit) with the Android SDK working perfectly with Eclipse - my first android application, using the first "Hello World" sample (found here - http://docs.xamarin.com/android/getting_started/hello_world - from Xamarin)
fails with the error "the OutputPath property who is not set for project NameProject.csproj".
I have tried re-runing the installation program from Xamarin and this error still occurs.
Could someone please suggest what may be causing this problem?
Thanks a lot.
the exact error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(9,9):
Error: The OutputPath property is not set for project 'helloWorld3.csproj'.
Please check to make sure that you have specified a valid combination of
Configuration and Platform for this project.
Configuration='Debug'
Platform='BPC'.
This error may also appear if some other project is trying to follow a
project-to-project reference to this project, this project has been
unloaded or is not included in the solution, and the referencing project
does not build using the same or an equivalent Configuration or Platform.
(helloWorld3)
I think we've seen this before. Your system manufacturer installed an environment variable called Platform onto your system. This breaks all msbuild based stuff, since msbuild automatically imports that as $(Platform), conflicting with the real $(Platform) that msbuild uses to compile.
Try removing the environment variable and try again.

Categories

Resources