小编Joh*_*now的帖子

构建项目时获取源和目标必须是不同的错误

我在构建项目时收到此错误。试图在 android-studio 中添加一个新库。有没有人基本上有一个想法,我正在尝试在这里创建一个新库。

尝试的选项:

  1. 手动删除构建

  2. 无效缓存/重启

  3. Gradle 清理构建缓存

  4. 构建->清理项目

    但是构建失败了。

    源 C:\Users\abc\AndroidStudioProjects\Events\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libnative-lib.so 和目标 C:\Users\abc\AndroidStudioProjects\Events\app\build\中间件\cmake\debug\obj\armeabi-v7a\libnative-lib.so 必须不同

CMakeLists.txt 我正在使用它:

# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them …
Run Code Online (Sandbox Code Playgroud)

cmake android-ndk android-studio

8
推荐指数
2
解决办法
923
查看次数

标签 统计

android-ndk ×1

android-studio ×1

cmake ×1