設置 | 登錄 | 註冊

作者共發了50篇帖子。

Android Studio 3.5.3下載地址

31樓 巨大八爪鱼 2025-8-18 19:49

logcat窗格:

32樓 巨大八爪鱼 2025-8-18 19:57

Terminal窗格在XP系統下不可用,但在win7系統下可用。

33樓 巨大八爪鱼 2025-8-21 20:50
關於Native C++項目Sync時報錯:

ERROR: Cause: executing external native build for cmake F:\Projects\AndroidStudioProjects\MyApplication3\app\src\main\cpp\CMakeLists.txt

解決辦法:

在SDK Tools裡面勾選下面的Show Package Details,然後勾選安裝NDK (Side by side) 21.0.6113669版本。


裝完後,點擊File -> Project Structure菜單,在SDK Location裡面設置安卓SDK和NDK的路徑。

注意路徑裡面不能有空格,默認的路徑C:\Documents and Settings\Administrator\AppData\Local\Android\Sdk是有空格的,要把這個文件夾手動複製到沒有空格的地方(比如F:\test),然後把SDK路徑改成F:\test\Sdk,NDK路徑改成F:\test\Sdk\ndk\21.0.6113669。改完後工程就可以成功Sync和Make Project了。

巨大八爪鱼工程沒Sync的情況下,Tools菜單下是沒有SDK Manager命令的,只能從File -> Settings菜單打開。
從File -> Settings菜單打開Settings for New Projects窗口後,左邊展開Apperance & Behavior -> System Settings -> Android SDK。
右邊打開SDK Tools選項卡,勾選下面的Show Package Details,然後勾選安裝NDK (Side by side) 21.0.6113669版本。
————————————————
版權聲明:本文為CSDN博主「巨大八爪魚」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處連結及本聲明。
原文連結:https://blog.csdn.net/ZLK1214/article/details/150590936
巨大八爪鱼最新版NDK29.0.13846066與Android Studio 3.5.3版本不匹配,必須要降級到21.0.6113669才能用。
34樓 巨大八爪鱼 2025-8-21 20:50
35樓 巨大八爪鱼 2025-8-21 21:13

目前2025年最新版CMake3.10.2.4988404是可以用的。

36樓 巨大八爪鱼 2025-8-22 09:48
成功編譯並在手機上運行Native C++程序。
37樓 巨大八爪鱼 2025-8-22 10:58

Android Studio 3.5.3可以成功導入oboe-1.9.0,但無法成功導入最新版的oboe-1.9.3。

https://github.com/google/oboe/archive/refs/tags/1.9.0.zip (Jun 26, 2024)

https://github.com/google/oboe/archive/refs/tags/1.9.3.zip (Dec 18, 2024)

target_link_libraries( # Specifies the target library.
native-lib

# Links the target library to the log library
# included in the NDK.
${log-lib} oboe)

# Set the path to the Oboe directory.
set (OBOE_DIR "D:\\My Documents\\Downloads\\oboe-1.9.0\\oboe-1.9.0")

# Add the Oboe library as a subdirectory in your project.
# add_subdirectory tells CMake to look in this directory to
# compile oboe source files using oboe's CMake file.
# ./oboe specifies where the compiled binaries will be stored
add_subdirectory (${OBOE_DIR} ./oboe)

# Specify the path to the Oboe header files.
# This allows targets compiled with this CMake (application code)
# to see public Oboe headers, in order to access its API.
include_directories (${OBOE_DIR}/include)

38樓 巨大八爪鱼 2025-8-22 11:15
39樓 巨大八爪鱼 2025-8-22 14:01

最好還是找一個沒有空格的文件夾放oboe源碼,否則代碼編輯器裡面會有很多紅線。

set (OBOE_DIR F:/test/oboe-1.9.0)

add_subdirectory (${OBOE_DIR} ./oboe)

include_directories (${OBOE_DIR}/include)

巨大八爪鱼用雙反斜槓也可以:set (OBOE_DIR F:\\test\\oboe-1.9.0)
40樓 巨大八爪鱼 2025-8-22 14:14

內容轉換:

回覆帖子
內容:
用戶名: 您目前是匿名發表。
驗證碼:
看不清?換一張
©2010-2025 Purasbar Ver3.0 [手機版] [桌面版]
除非另有聲明,本站採用知識共享署名-相同方式共享 3.0 Unported許可協議進行許可。