ashraf789 / Cake-VPN

Android VPN app based on OpenVPN library.
GNU General Public License v2.0
382 stars 141 forks source link

Not found libovpnexec.so #71

Closed Natkarock closed 3 years ago

Natkarock commented 3 years ago

When I start the current example project, all working right. But when i import vpnLib module in my project, i have java.io.IOException: Cannot run program "/data/app/com.lerta.vpndiler-CjZBOgmwtQoOv6dO3MuGhg==/lib/arm64/libovpnexec.so": error=2 in **** in OpenVPNThread file. Maybe i should do somethning else when importing this module?

ashraf789 commented 3 years ago

Add next property to file gradle.properties, should help android.bundle.enableUncompressedNativeLibs=false

49

Natkarock commented 3 years ago

Add next property to file gradle.properties, should help android.bundle.enableUncompressedNativeLibs=false

49

It doesn't help

ashraf789 commented 3 years ago

I have used this library with a couple of projects and I didn't face this error. probably you are missing something. check this project grade and other settings with your project setting.

Natkarock commented 3 years ago

I have used this library with a couple of projects and I didn't face this error. probably you are missing something. check this project grade and other settings with your project setting.

After a hours of pain i solved the problem by adding

<application
...
android:extractNativeLibs="true"
tools:replace="android:extractNativeLibs">

in AndroidManifest file of main app.

ashraf789 commented 3 years ago

Congratulations on solving your issue. But in my project, I didn't add these lines and there is no problem. https://github.com/ashraf789/Cake-VPN/blob/master/app/src/main/AndroidManifest.xml

Natkarock commented 3 years ago

Congratulations on solving your issue. But in my project, I didn't add these lines and there is no problem. https://github.com/ashraf789/Cake-VPN/blob/master/app/src/main/AndroidManifest.xml

Yes, i know. It's strange