安卓错误 :error: linker command failed with exit code 1 (use -v to see invocation) build error

标签 android android-studio armv7

编译Android项目时出现如下错误,请问是什么原因导致的?

“错误:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)”

我的 Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "facebook.f8demo"
        minSdkVersion 20
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags "-frtti -fexceptions -std=c++11"
            }
        }
        ndk {
            // Specifies the ABI configurations of your native
            // libraries Gradle should build and package with your APK.
            abiFilters  'armeabi-v7a'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar', '*.so'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

项目源代码Caffe2AICamera

Android Error:error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

对我来说,我使用的是 Android-25,但我必须使用 arm64-v8a,因为它是 64 位的。我认为 armeabi-v7a 是 32 位的。有关 Android 上 ABI 管理的详细信息,请参见:https://developer.android.com/ndk/guides/abis.html

关于安卓错误 :error: linker command failed with exit code 1 (use -v to see invocation) build error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44250373/

相关文章:

iphone - 为 iOS6.0 ARMv7 处理器构建 FFMPEG 库

android - 在 DialogPreference 中实现固定高度的可滚动 ListView

android - 辅助功能 : Talkback, WebView 和用户的区域设置

Android - 解压缩密码编码的 zip 文件

java - 无法使用 JSoup 解析 HTML

android - 如何更改 Android Studio 编辑器的外观?

ios - 在带有 10.9 的 xCode 6.1 Mac 上安装 ffmpeg ios 库 armv7、armv7s、i386 和通用

android - 使用继承或 fragment 之间的设计选择

java - 需要从字符串源打开一个 Intent

centos7 - ARM7 的 EPEL 存储库