從 Google Mobile Vision 遷移
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Mobile Vision 已淘汰,我們建議開發人員改用 ML Kit SDK。遷移至新 SDK 可確保您享有最佳效能、穩定性和最新功能。此外,ML Kit 還提供其他機器學習 API,不僅適用於 Vision,也適用於自然語言用途。
如果您目前在應用程式中使用 Mobile Vision 的條碼掃描、文字辨識或臉部偵測 API,請按照 ML Kit 遷移指南 (Android 版) 和 ML Kit 遷移指南 (iOS 版) 的說明,將應用程式遷移至新的 ML Kit SDK。
常見問題
如何得知應用程式是否使用 Mobile Vision?
在 Android 上,請檢查模組 (應用程式層級) Gradle 檔案 (通常為 app/build.gradle
) 是否包含這個依附元件:
com.google.android.gms:play-services-vision:x.x.x
在 iOS 上,請檢查 Podfile 是否包含下列任一依附元件:
pod 'GoogleMobileVision/FaceDetector', '8.0.0'
pod 'GoogleMobileVision/BarcodeDetector', '8.0.0'
pod 'GoogleMobileVision/TextDetector', '8.0.0'
遷移至 ML Kit SDK 有何優點?
由於 Mobile Vision SDK 提供的現有 API 已淘汰,因此不會再收到更新。遷移至 ML Kit 可確保應用程式能享有最新的 API 錯誤修正和改善項目,包括更新的機器學習模型和硬體加速功能。
此外,機器學習套件 API 還提供其他優點:
如需最新異動項目的完整清單,請參閱 ML Kit SDK 版本資訊。
ML Kit API 是否提供與 Mobile Vision API 相同的功能?
條碼掃描、文字辨識和臉部偵測 API 提供與 Mobile Vision 對應 API 相同的功能。
但 ML Kit 不再支援 Mobile Vision 中的多重偵測器、多重處理器和聚焦處理器。開發人員如有需要,可以相對輕鬆地實作相同功能。
取得說明
如有任何問題,請參閱社群頁面,瞭解可用來與我們聯絡的管道。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eGoogle Mobile Vision is deprecated and developers should migrate to the ML Kit SDK for continued support and new features.\u003c/p\u003e\n"],["\u003cp\u003eML Kit offers enhanced performance, stability, and access to the latest machine learning advancements, including new APIs for Vision and Natural Language.\u003c/p\u003e\n"],["\u003cp\u003eMigration guides are available for both Android and iOS to assist developers in transitioning their apps from Mobile Vision to ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eML Kit provides additional benefits like bundled variants on Android, API-specific improvements such as raw barcode output and Euler X angle in face detection, and Android Jetpack Lifecycle support for easier integration with CameraX.\u003c/p\u003e\n"]]],[],null,["Google Mobile Vision was deprecated and we are asking developers to migrate to the ML Kit SDK which is its replacement. Migrating to the new SDK ensures you get the best performance, stability and latest features. In addition, ML Kit provides additional ML-powered APIs, not only for Vision, but also Natural Language use cases.\n\nIf you are using Mobile Vision's barcode scanning, text recognition or face detection APIs in your app today, please migrate to the new ML Kit SDK, by following the\n**[ML Kit migration guide for Android](/ml-kit/mobile-vision-migration/android)** and the\n**[ML Kit migration guide for iOS](/ml-kit/mobile-vision-migration/ios)**.\n\nFrequently asked questions\n\nHow do I know if my app is using Mobile Vision?\n\nOn Android, check if your module (app-level) Gradle file (usually\n`app/build.gradle`) contains this dependency:\n\n- `com.google.android.gms:play-services-vision:x.x.x`\n\nOn iOS, check if you podfile contains one of these dependencies:\n\n- `pod 'GoogleMobileVision/FaceDetector', '8.0.0'`\n- `pod 'GoogleMobileVision/BarcodeDetector', '8.0.0'`\n- `pod 'GoogleMobileVision/TextDetector', '8.0.0'`\n\nWhat benefits do I get from migrating to the ML Kit SDK?\n\nSince the existing APIs offered by the Mobile Vision SDK are deprecated, they\nwill no longer receive updates. Migrating to ML Kit ensures your application\nbenefits from the latest bug fixes and improvements to the APIs, including\nupdated ML models and hardware acceleration.\n\nIn addition, the ML Kit APIs offer some other benefits:\n\n- New bundled variants of the APIs on Android that allow you to statically link the ML Kit SDK with your appplication.\n- API specific improvements, for example:\n\n - [Barcode Scanning API](/ml-kit/vision/barcode-scanning) now supports raw output\n - [Face Detection API](/ml-kit/vision/face-detection) now provides the Euler X angle\n- [Android Jetpack Lifecycle](https://developer.android.com/reference/androidx/lifecycle/Lifecycle)\n support is added to all APIs. You can now use `addObserver` to automatically\n manage the initiation and teardown of ML Kit APIs as the app goes through screen\n rotation or closure by the user / system. This makes integration with CameraX\n easier.\n\nA full list of the latest changes can be found in the [ML Kit SDK release\nnotes](/ml-kit/release-notes).\n\nDo the ML Kit APIs provide the same functionality as the Mobile Vision APIs?\n\nThe Barcode scanning, Text recognition and Face detection APIs provide the same\nfunctionality and capabilities as their Mobile Vision counter-parts.\n\nAn exception is that multi-detectors, multi-processors and focusing-processors in\nMobile Vision are no longer supported in ML Kit. The same functionality can be\nimplemented relatively easily by the developer if desired.\n\nGetting help\n\nIf you run into any issues, check out our [Community page](/ml-kit/community)\nwhere we outline the channels available for getting in touch with us."]]