Navigation SDK for Android 程式碼範例
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 導航 SDK GitHub 範例存放區包含範例應用程式,示範如何使用 SDK。您可以匯入及建構應用程式、新增 API 金鑰、查看示範教學,以及使用隨附的程式碼範例著手建構應用程式。存放區內含兩個範例應用程式:
- 地圖範例,展示 MapView 和 NavView UI:
android-navigation-samples/map-sample/
- Navigation-sample,基本導覽體驗:
android-navigation-samples /navigation-sample/
如要進一步瞭解如何執行範例應用程式,請參閱試用試用版。
Navigation SDK for Android 程式碼研究室
如要瞭解如何使用 Navigation SDK 建構簡單的 Android 應用程式,請參閱 Android 版 Navigation SDK 程式碼研究室。本程式碼研究室提供逐步指南,說明如何使用 Kotlin 實作 SDK。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThe Navigation SDK for Android provides sample apps on GitHub that demonstrate the use of the SDK, allowing developers to import, build, and explore the code.\u003c/p\u003e\n"],["\u003cp\u003eThe repository features two key samples: "Map-sample" focusing on MapView and NavView UI, and "Navigation-sample" showcasing the core navigation experience.\u003c/p\u003e\n"],["\u003cp\u003eA dedicated Codelab offers a step-by-step guide to build a simple Android app using the Navigation SDK with Kotlin, aiding developers in practical implementation.\u003c/p\u003e\n"]]],[],null,["# Navigation SDK for Android code samples\n\nThe Navigation SDK for Android [samples repository on\nGitHub](https://github.com/googlemaps-samples/android-navigation-samples)\nincludes sample apps that demonstrate the use of the SDK. You can import and\nbuild the apps, add your API key, view the demo, and use the sample code\nsupplied as a starting point for your app. The repository contains two sample\napps:\n\n- **Map-sample** , a showcase of the MapView and NavView UI: `android-navigation-samples/map-sample/`\n- **Navigation-sample** , The fundamental navigation experience: `android-navigation-samples /navigation-sample/`\n\nFor more information about running the sample apps, see [Try the\ndemo](/maps/documentation/navigation/android-sdk/try-demo).\n\nNavigation SDK for Android Codelab\n----------------------------------\n\nTo learn how to use the Navigation SDK by building a simple Android app, see the\n[Navigation SDK for Android\nCodelab](https://codelabs.developers.google.com/codelabs/maps-platform/navigation-sdk-101-android).\nThe Codelab provides a step-by-step guide for implementing the SDK using Kotlin."]]