AndroidStudio CANNOT LINK EXECUTABLE is 32-bit instead of 64-bit

让人想犯罪 __ 提交于 2020-05-16 19:02:34

问题


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:

  1. add android.useDeprecatedNdk=true into gradle.properties

  2. add 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!