生成错误:任务':app:transformNativeLibsWithStripDebugSymbolForDebug的执行失败

时间:2018-06-20 16:14:59

标签: android android-gradle android-build android-buildconfig

我的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'

2 个答案:

答案 0 :(得分:1)

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

在卸载我的项目中不需要的NDK后解决了该问题。

enter image description here

答案 1 :(得分:0)

已经晚了,但可能对其他人有帮助

我通过降级为“ android-ndk-r16b”解决了该问题

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

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