2

我的 android 应用程序中有一个 gradle 构建错误。我尝试更新 NDK 和所有模块,但它仍然出现。有谁知道什么会导致它以及如何解决它?下面是我的gradle文件:

Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
> A problem occurred starting process 'command 'D:\Android\SDK\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip''

毕业典礼:

apply plugin: 'com.android.application'

android {
    signingConfigs {
        debug {
            storeFile file('../buildsystem/debug_key.jks')
            storePassword 'mypassword'
            keyAlias 'androiddebug'
            keyPassword 'mypassword'
        }
        release {
            keyAlias 'Alias'
            keyPassword 'mypassword'
            storeFile file('release.jks')
            storePassword 'mypassword'
        }
    }
    compileSdkVersion 25
    buildToolsVersion "27.0.3"
    defaultConfig {
        applicationId "com.mytestapplication.app"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 3
        versionName "1.2.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
            //debuggable true
        }
        debug {
            signingConfig signingConfigs.debug
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.journeyapps:zxing-android-embedded:3.5.0'
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.android.support:cardview-v7:25.0.+'
    compile 'com.android.support:recyclerview-v7:25.0.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.code.gson:gson:2.6.1'
    compile 'com.afollestad.material-dialogs:core:0.9.4.5'
    compile 'io.card:android-sdk:5.5.1'
    compile 'com.github.pinball83:masked-edittext:1.0.3'
    compile 'com.github.paolorotolo:appintro:3.3.0'
    compile 'com.google.firebase:firebase-core:12.0.0'
    compile "com.google.firebase:firebase-messaging:12.0.0"

    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'
4

2 回答 2

2

以防万一,它可能对其他人有所帮助。

它在卸载我的项目中不需要的 NDK 后解决。

在此处输入图像描述

于 2018-08-28T09:52:59.623 回答
0

为时已晚,但可能对其他人有所帮助

我通过降级到“android-ndk-r16b”来解决它

从此链接下载 https://developer.android.com/ndk/downloads/older_releases

然后在项目结构窗口中设置 ndk 文件夹路径。

于 2019-11-07T10:44:06.763 回答