Recently in the angel's wing of the MRP simulator ...
Moved to Androidstudio and now want to put the original Android
. Mk the way it's changed to CMake is compiled, but there are some symbols that are not found at compile time.
Undefined reference, these are actually in a file called mr_gc, but there is no such file. So decided to ignore the missing symbols, but the search was android.mk
Finally found in this blog
74509894
By setting this parameter
Android_allow_undefined_symbols
This is set in the Build.gradle,
Attached Build.gradle
Apply plugin: ' Com.android.library '
Android {
Compilesdkversion 27
Buildtoolsversion "27.0.1"
Defaultconfig {
Minsdkversion 17
Targetsdkversion 17
ndk{
Abifilters "Armeabi"
}
Externalnativebuild {
CMake {
Cppflags ""
Arguments "-dandroid_allow_undefined_symbols=true"
}
}
}
Buildtypes {
Release {
Minifyenabled false
Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' proguard-rules.txt '
}
Debug {
Jnidebuggable true
}
sourcesets {
Main {
Jnilibs.srcdir ' Src/main/libs '
Jni.srcdirs = []
}
}
}
Externalnativebuild {
CMake {
Path "CMakeLists.txt"
}
}
}
dependencies {
Compile ' com.android.support:support-v4:23.+ '
}
Android NDK ignores error:undefined reference to ' can't find symbol