Replace gnustl_shared with c++_shared

This commit is contained in:
crimean 2018-08-07 21:24:35 +03:00
parent d1816ba821
commit ee102f8b37
6 changed files with 15 additions and 17 deletions

1
OsmAnd/.gitignore vendored
View file

@ -27,6 +27,7 @@ local.properties
raw/ raw/
obj/ obj/
libgnustl/ libgnustl/
libc++/
cpd.xml cpd.xml
jni/Local.mk jni/Local.mk
out/ out/

View file

@ -103,7 +103,7 @@ android {
} }
legacy { legacy {
jniLibs.srcDirs = ["libgnustl"] jniLibs.srcDirs = ["libc++"]
} }
} }
@ -311,16 +311,12 @@ task cleanupDuplicatesInCore() {
dependsOn buildOsmAndCore dependsOn buildOsmAndCore
// doesn't work for legacy debug builds // doesn't work for legacy debug builds
doLast { doLast {
file("libgnustl/arm64-v8a").mkdirs() file("libc++/armeabi-v7a").mkdirs()
file("libs/arm64-v8a/libgnustl_shared.so").renameTo(file("libgnustl/arm64-v8a/libgnustl_shared.so")) file("libs/armeabi-v7a/libc++_shared.so").renameTo(file("libc++/armeabi-v7a/libc++_shared.so"))
file("libgnustl/armeabi").mkdirs() file("libc++/arm64-v8a").mkdirs()
file("libs/armeabi/libgnustl_shared.so").renameTo(file("libgnustl/armeabi/libgnustl_shared.so")) file("libs/arm64-v8a/libc++_shared.so").renameTo(file("libc++/arm64-v8a/libc++_shared.so"))
file("libgnustl/armeabi-v7a").mkdirs() file("libc++/x86").mkdirs()
file("libs/armeabi-v7a/libgnustl_shared.so").renameTo(file("libgnustl/armeabi-v7a/libgnustl_shared.so")) file("libs/x86/libc++_shared.so").renameTo(file("libc++/x86/libc++_shared.so"))
file("libgnustl/mips").mkdirs()
file("libs/mips/libgnustl_shared.so").renameTo(file("libgnustl/mips/libgnustl_shared.so"))
file("libgnustl/x86").mkdirs()
file("libs/x86/libgnustl_shared.so").renameTo(file("libgnustl/x86/libgnustl_shared.so"))
} }
} }
afterEvaluate { afterEvaluate {

View file

@ -1,5 +1,5 @@
APP_STL := gnustl_shared # APP_STL := gnustl_shared
# APP_STL := c++_shared APP_STL := c++_shared
APP_CPPFLAGS := -std=c++11 -fexceptions -frtti APP_CPPFLAGS := -std=c++11 -fexceptions -frtti
APP_SHORT_COMMANDS := true APP_SHORT_COMMANDS := true

View file

@ -2,3 +2,4 @@ armeabi/
x86/ x86/
armeabi-v7a/ armeabi-v7a/
mips/ mips/
arm64-v8a/

View file

@ -33,8 +33,8 @@ public class NativeOsmandLibrary extends NativeLibrary {
if (!isLoaded()) { if (!isLoaded()) {
isNativeSupported = false; isNativeSupported = false;
try { try {
log.debug("Loading native gnustl_shared..."); //$NON-NLS-1$ log.debug("Loading native c++_shared..."); //$NON-NLS-1$
System.loadLibrary("gnustl_shared"); System.loadLibrary("c++_shared");
log.debug("Loading native libraries..."); //$NON-NLS-1$ log.debug("Loading native libraries..."); //$NON-NLS-1$
System.loadLibrary("osmand"); System.loadLibrary("osmand");
log.debug("Creating NativeOsmandLibrary instance..."); //$NON-NLS-1$ log.debug("Creating NativeOsmandLibrary instance..."); //$NON-NLS-1$

View file

@ -7,7 +7,7 @@ buildscript {
} }
dependencies { dependencies {
//classpath 'com.android.tools.build:gradle:2.+' //classpath 'com.android.tools.build:gradle:2.+'
classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.0.0' classpath 'com.google.gms:google-services:3.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }