aFreeRDP is the Android client of the FreeRDP project.
I'm using 64 bit Ubuntu 15.04 Vivid.
My goal is to compile aFreeRDP. I'm at the finish line, but cannot cross it. I successfully installed the required packages, Android NDK, and then compiled the external openssl (the android shell script does that automatically). Then I generated make files. Interestingly neither
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/AndroidToolchain.cmake -DANDROID_NDK=/home/csaba/android-ndk -DFREERDP_EXTERNAL_SSL_PATH=/home/csaba/GitRepos/FreeRDP/external/openssl -DANDROID_SDK=/home/csaba/android-sdk-linux
nor
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/AndroidToolchain.cmake -DANDROID_NDK=/home/csaba/android-ndk -DFREERDP_EXTERNAL_SSL_PATH=/home/csaba/GitRepos/FreeRDP/external/openssl -DCMAKE_BUILD_TYPE=Debug -DANDROID_BUILD_JAVA=OFF -DANDROID_SDK=/home/csaba/android-sdk-linux -DFREERDP_EXTERNAL_JPEG_PATH=/home/csaba/GitRepos/FreeRDP/external/jpeg8d
produced any apk
, but they happily compiled libfreerdp-android.so
.
I need an apk
, so I went to the client/Android/aFreeRDP
and since I had a build.xml
there, I said ant build install
. The build process started, but then died at the resource compilation phase. I have the current level 23 android build tools and companion stuff with the Android SDK. I see in the source, that the source was originally targeted to level 21. I added level 21 SDK too, and tried to force maxSdkVersion
to 21 in the AndroidManifest.xml
, but that didn't help. The compilation log:
As you can see after resource errors
[aapt] Generating resource IDs...
[aapt] /home/csaba/GitRepos/FreeRDP/client/Android/appcompat_v7/res/values-v23/styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
[aapt]
[aapt] /home/csaba/GitRepos/FreeRDP/client/Android/appcompat_v7/res/values-v23/styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
[aapt]
it dies
BUILD FAILED
/home/csaba/android-sdk-linux/tools/ant/build.xml:597: The following error occurred while executing this line:
/home/csaba/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/csaba/android-sdk-linux/tools/ant/build.xml:694: null returned: 1
Comparing the level 21 and the level 23 resources, the level 21 has way more stuff, the level 23 has single entries, very vague. How can I fix this? Let me know what files should I post.
Update 1:
Get rid of an annoying issue with ADT, which could have affected this bug too: Eclipse Error: Error parsing ...\android-22\android-wear\armeabi-v7a\devices.xml Unfortunately uninstalling the Wear images made the ADT error go away, but the aFreeRDP compilation error still remained.
Update 2: I tried to go back in time and my goal was to have an Android SDK which provides 21, but doesn't have level 23. I backed up my current Android SDK. SDK download tgz 22.6.2 (https://dl.google.com/android/android-sdk_r22.6.2-linux.tgz) only provides target 21. But SDK download tgz 23.0.0 (https://dl.google.com/android/android-sdk_r23-linux.tgz) already wants to upgrade to 24. So I cannot get the system to a state, when I don't have the target 23 (which indirectly causes errors somehow - more correctly, the level 24's compatibility facility for target 23 (which satisfies target 21)), but have the target 21.
(Bonus question: why Google makes it so hard to download older SDKs? I had to fiddle and guess URLs).
Update 3:
I managed to debug aFreeRDP from Android Studio (v 1.5) using the directions github.com/FreeRDP/FreeRDP/blob/master/docs/README.android