androidlinuxfreerdp

Android aFreeRDP cmake build failed


I tried to build aFreeRDP app for android.

I followed the instructions up to ldconfig described in compilation page.

After that I ran below commands and no one works. And showing that build failed.

./scripts/android-build-freerdp.sh

or

./scripts/android-build-freerdp.sh --ndk $ANDROID_NDK --sdk $ANDROID_SDK

Output in terminal:

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ANDROID_ABI
    CMAKE_TOOLCHAIN_FILE


-- Build files have been written to: /home/sufi/FreeRDP
/home/sufi/FreeRDP/build/freerdp-build/armeabi
[RUN] cmake --build . --target install
Error: could not load cache
[ERROR] cmake --build . --target install retured 1

Then I ran ./gradlew build to create an apk and it gives me below error when tries to connect with a remote connection:

com.freerdp.afreerdp E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Native method not found: com.freerdp.freerdpcore.services.LibFreeRDP.freerdp_new:(Landroid/content/Context;)J
at com.freerdp.freerdpcore.services.LibFreeRDP.freerdp_new(Native Method)
at com.freerdp.freerdpcore.services.LibFreeRDP.newInstance(LibFreeRDP.java:116)
at com.freerdp.freerdpcore.application.GlobalApp.createSession(GlobalApp.java:128)
at com.freerdp.freerdpcore.presentation.SessionActivity.connect(SessionActivity.java:661)
at com.freerdp.freerdpcore.presentation.SessionActivity.processIntent(SessionActivity.java:651)

What have I missed?

Thanks is advance.

I tried on ubuntu 16.04

Openssl version : OpenSSL 1.0.2g 1 Mar 2016


Solution

  • Remove the CMakeCache.txt just solved my issue.

    Special thanks to Zhifeng Hu

    Reference