lizongying / my-tv

我的电视 电视直播软件,安装即可使用
https://lyrics.run/my-tv.html
29.8k stars 3.33k forks source link

[FR] android studio打开项目提示有错误。不知什么原因?请说一下如何导入项目学习 #779

Closed mikedeng888 closed 4 months ago

mikedeng888 commented 4 months ago

检查清单

改进目的

[CXX1429] error when building with cmake using D:\googleplayproject\my-tv-1.9.8\app\CMakeLists.txt: -- The C compiler identification is Clang 14.0.6 -- The CXX compiler identification is Clang 14.0.6 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/AndroidSDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/AndroidSDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done

解决方案

No response

额外信息

No response

winkyz commented 4 months ago

我这里提示 缺少 native.c 不知道如何解决 CMake Error at CMakeLists.txt:17 (add_library): Cannot find source file:

src/main/cpp/native.c
lizongying commented 4 months ago

幾種解決方法:

  1. 自己補充native.c
  2. 去掉相關方法,不用native
  3. ./gradlew assembleRelease -PIS_SO_BUILD=false 編譯成功,但由於沒有方法實現,請求的時候會失敗。建議使用此種方式,同時可以直接修改視頻地址,以供測試。