Lucas
Lucas

Reputation: 181

Android Studio Wikitiude Samples Error

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)

Upvotes: 5

Views: 1168

Answers (3)

alekshandru
alekshandru

Reputation: 327

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

Upvotes: 7

BrentM
BrentM

Reputation: 5757

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.

Upvotes: 0

Tostifrosti
Tostifrosti

Reputation: 151

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.

Upvotes: 0

Related Questions