Open VPN in sdk19

Hi, i downloaded the great f-droid open vpn app for my android 4.4.2 (sdk 19), the apk i downloaded work fine for me, but when i downloaded the tarball and try to run it, it require sdk 21 and not working.
if i try to change the minsdk from 21 to 19 in the gradle, i have endless error.
in the version description it says- requires android version 4.0 and up, but i can’t make it work in all my phones in sdk 19.

how can i run the the tarball in my own studion in version 4.0?

thanks

  1. I don’t know for sure, but it is possible that OpenVPN does not work on some of your devices because it uses native code that is only compatible with the following architectures: arm64-v8a, armeabi, armeabi-v7a, x86, x86_64. If your device is another architecture it will not work.

  2. Regarding building the code yourself, there is a difference between the minSdkVersion and the buildToolsVersion. minSdkVersion is the lowest API on which the software will run correctly. In the tarball for version 0.6.66 downloaded from https://f-droid.org/repository/browse/?fdfilter=openvpn&fdid=de.blinkt.openvpn the minSdkVersion listed in /main/build.gradle is 14 (which corresponds to Android 4.0).

buildToolsVersion in the same file is 25.0.2, which means the SDK 25.0.2 must be available during the build process. If you are using Android Studio you can install SDK 25.0.2 from Tools → Android → SDK Manager under the under the SDK Tools tab with Show Package Details checked. This will build an APK that will run on any version of Android after 4.0 and that runs in native mode under Android 7.1.2 (instead of compatibility mode).

Changing the buildToolsVersion to a lower number will often cause the build to fail because the code contains commands that aren’t native to earlier APIs. The newer SDK knows this and adds in extra functionality (often in the form of a support library) to make it compatible with older devices.