问题
I have just cloned a repository from a friend and tried to build the app on my Android Studio 3.4.2. The APK he provided me was succeffully installed and worked just fine. But, when I'm building the apk myself on my device, I get the following errors (along with some others..):
A/linker: CANNOT LINK EXECUTABLE "/system/bin/dpmd": "/system/lib64/libdpmframework.so" is 32-bit instead of 64-bit
When running the built apk, the app actually doesn't crash or anything, just doesn't behave very well as things don't work (log in process for example). I do realize there's something wrong the the libdpmframework.so as it is built sa a 32bit lib, but how do I 'control' it? My project gradle file is targeted to 64bit as well as my ndk compiler.
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.kolbeat.android.app"
minSdkVersion 23
targetSdkVersion 29
versionCode 9
versionName "2.5.0"
vectorDrawables.useSupportLibrary true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
So the question is, how can I make sure the lib will be built as 64bit? Cheers.
回答1:
Try the following steps:
add
android.useDeprecatedNdk=trueinto gradle.propertiesadd new folder named armeabi under the libs, then copy a 32bit .so file into the new folder
来源:https://stackoverflow.com/questions/59324884/androidstudio-cannot-link-executable-is-32-bit-instead-of-64-bit