如果您主要在 Windows 上進行開發,並使用 Microsoft Visual Studio 編寫 C 或 C++ 程式碼,AGDE 就是最適合的 API。如果您使用其他工具編寫 C 或 C++ 程式碼,請使用 Android Studio 進行 Android 開發作業。
AGDE 是 Android Game Development Kit 的一部分。Android Game Development Kit 包含支援在 Android 上提供優質遊戲的程式庫和工具。Android Game Development Kit 的程式庫與 AGDE 專案相容。Android Graphics Inspector 等工具可協助您調整遊戲,以達到最佳效能。
在 Visual Studio 中鎖定 Android
AGDE 將 Android 新增為 Visual Studio 的平台目標。這項解決方案可讓現有的多平台 Visual Studio 遊戲專案將 Android 快速整合為新平台。Visual Studio IntelliSense 功能與 AGDE 相容。支援目前所有的 Android CPU 架構:ARM 和 Intel (32 位元與 64 位元)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Develop your game in Microsoft Visual Studio\n\n[Android Game Development Extension](/games/agde) (AGDE) for Visual Studio\nallows you to target Android as a platform for your Visual Studio\nprojects. AGDE supports a full range of development activities: project\nmanagement, building, debugging, and profiling.\n\nAGDE is best suited to you if you're developing primarily on Windows and use\nMicrosoft Visual Studio to write C or C++ code. If you're writing C or C++ code\nusing different tools, use Android Studio to develop for Android.\n\nAGDE is part of the Android Game Development Kit. The Android Game Development\nKit includes libraries and tools that support making great games on Android. The\nlibraries in the Android Game Development Kit are compatible with AGDE projects.\nTools like the Android Graphics Inspector can help you tune your game for\noptimal performance.\n\nTarget Android in Visual Studio\n-------------------------------\n\nAGDE adds Android as a platform target to Visual Studio. This enables existing\nmulti-platform Visual Studio game projects to quickly integrate Android as a new\nplatform. Visual Studio IntelliSense features are compatible with AGDE. All\ncurrent Android CPU architectures are supported: both ARM and Intel in 32-bit\nand 64-bit.\n\nBuild in Visual Studio\n----------------------\n\nAGDE integrates with MSBuild for compiling and linking C++ code for Android. The\nAndroid NDK is used to supply the compiler and build toolchain. For developers\nthat have specific dependencies, AGDE is compatible with multiple versions of\nthe NDK. Project build settings are configured using the standard Visual Studio\nproperty system. AGDE is compatible with Incredibuild, enabling developers to\nuse existing distributed build infrastructure to speed up build times when\ncompiling for Android.\n\nDebug in Visual Studio\n----------------------\n\nAGDE supports deploying to, running on, and debugging with both an emulator and\na physical device. The debugger can also be attached to an already-running\nprocess. AGDE interfaces with LLDB for debugging support. With AGDE, debug\nsessions run inside Visual Studio, using its standard interface for breakpoints,\ntracing and variable inspection. Additional features include Memory and Register\nviews, and disassembly of native code. LLDB shell functionality is available\nthrough the Visual Studio Command Window. Unreal Engine developers using 4.26.1\nand later can use AGDE to debug on Android.\n\nProfile from Visual Studio\n--------------------------\n\nAGDE integrates with a standalone version of the Android Studio Profiler. This\nprofiler can be launched from Visual Studio and attached to a running game\nsession. The Android Studio Profiler displays real time usage statistics for\nCPU, memory, network, and energy.\n\nRequirements\n------------\n\nAGDE requires an Intel or AMD PC running Microsoft Windows with the following software installed:\n\n- .NET Core SDK 2.2\n- Android Studio 3.5 or later\n- Visual Studio 2017 (15.4.0 or later) or Visual Studio 2019 (16.0.0 or later)\n\nMore information\n----------------\n\n(Links to download)\n(Links to AGDE guide)"]]