diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 5ad3834e..4d26dbbb 100755 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,13 +1,7 @@ - - + android:installLocation="auto"> @@ -15,6 +9,7 @@ + does not seem to contain C++11 features -APP_STL := gnustl_shared +# ABI arm64-v8a and x86_64 supported only from platform-21 +#APP_ABI := arm64-v8a x86_64 +#APP_PLATFORM := android-21 + +NDK_TOOLCHAIN_VERSION := clang +APP_STL := c++_shared # Enable c++11 extensions in source code -APP_CPPFLAGS += -std=c++11 +APP_CPPFLAGS += -std=c++11 -fexceptions -frtti APP_CPPFLAGS += -DANDROID -D__ANDROID__ -DUSE_UPNP ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) APP_CPPFLAGS += -DANDROID_ARM7A endif -# Forcing debug optimization. Use `ndk-build NDK_DEBUG=1` instead. -#APP_OPTIM := debug - # git clone https://github.com/PurpleI2P/Boost-for-Android-Prebuilt.git # git clone https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git # git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git diff --git a/android/src/org/purplei2p/i2pd/I2PD_JNI.java b/android/src/org/purplei2p/i2pd/I2PD_JNI.java index 63867273..a5845804 100644 --- a/android/src/org/purplei2p/i2pd/I2PD_JNI.java +++ b/android/src/org/purplei2p/i2pd/I2PD_JNI.java @@ -17,7 +17,7 @@ public class I2PD_JNI { public static native void onNetworkStateChanged(boolean isConnected); public static void loadLibraries() { - System.loadLibrary("gnustl_shared"); + System.loadLibrary("c++_shared"); System.loadLibrary("i2pd"); } } diff --git a/libi2pd/util.h b/libi2pd/util.h index e31e7b3f..6da20ad6 100644 --- a/libi2pd/util.h +++ b/libi2pd/util.h @@ -9,21 +9,23 @@ #include #ifdef ANDROID +#ifndef __clang__ #include namespace std { -template -std::string to_string(T value) -{ - return boost::lexical_cast(value); -} + template + std::string to_string(T value) + { + return boost::lexical_cast(value); + } -inline int stoi(const std::string& str) -{ - return boost::lexical_cast(str); -} + inline int stoi(const std::string& str) + { + return boost::lexical_cast(str); + } } #endif +#endif namespace i2p {