如何确定我的Android项目的gradle构建文件中需要哪些依赖项
到目前为止,Android Studio已处理了此问题,但并非万无一失。
So far Android studio has handled this, but it is not infallible.
给出目标构建版本(27)的信息以及我需要的组件(TabViews与片段,但无需刷卡),在哪里可以找到确定模块build.gradle依赖项所需的信息?
Given the information of target build version (27) and which components I require (TabViews with Fragments, but no need for swiping), where can I find the information required to determine what goes in the module build.gradle dependencies?
这可能不是解决方案,但会有所帮助。这是列出这些库的两个链接。
This might not be the solution, but a little help. Here are two links that list the libraries.
Android支持库: https://developer.android.com/topic/libraries/support-library/packages
Android Support libraries: https://developer.android.com/topic/libraries/support-library/packages
Android X库: https://developer.android.com/jetpack/androidx/migrate
Android X libraries: https://developer.android.com/jetpack/androidx/migrate
因此,如果由于缺少类而导致构建失败,则可以在此处进行检查并添加合适的依赖项。
So if you build fails because of missing classes, you can check here and add the fitting dependency.
也请注意,Android Studio可让您自动迁移到Android X(重构>迁移到AndroidX)。
Also note that Android Studio lets you auto-migrate to Android X (Refactor > Migrate to AndroidX).