Execution failed for task ‘:demo:stripReleaseDebugSymbols‘.

> Task :demo:stripReleaseDebugSymbols FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':demo:stripReleaseDebugSymbols'.
> 1 exception was raised by workers:
  org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/mnt/c/Users/***/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/bin/aarch64-linux-android-strip''

 

我是在WSL下运行gradlew命令的,而使用的是Windows下的Android NDK,至少这个版本是不没有aarch64-linux-android-strip的,所以没法编译通过。

可以参考的解决办法是,在模块的build.gradle文件中android节点添加上packagingOptions节点,并配置doNotStrip属性:

android {
    packagingOptions {
        doNotStrip '**/*.so'
    }
}

当然这只是临时解决办法,只是避免了strip,正式发布不要这样做哦。

©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页