[英]When I add a lib to a project from maven. How do I find out classes I can use?
Documentation of said library says to import a specific class, and different one for older versions.所述库的文档说要导入一个特定的类,而对于旧版本则要导入不同的类。
I tried both and none are recognized by android studio as exisiting.我尝试了两者,但没有一个被 android studio 识别为存在。
How do I find out if an mavenCentral() library has been downloaded and included to my android project??如何确定 mavenCentral() 库是否已下载并包含在我的 android 项目中?
How do I find out if an mavenCentral() library has been downloaded and included to my android project?
如何确定 mavenCentral() 库是否已下载并包含在我的 android 项目中?
If you added the appropriate line to your module's Gradle build script (eg, implementation ...
), it should be there, or you would have gotten a build error complaining about not being able to download the artifact.如果您在模块的 Gradle 构建脚本中添加了适当的行(例如,
implementation ...
),它应该在那里,否则您会收到构建错误,抱怨无法下载工件。
You can see what libraries are available to your overall project in Android Studio by first switching the project tree from the Android view to the Project view via the drop-down above the tree:首先通过树上方的下拉菜单将项目树从 Android 视图切换到项目视图,您可以在 Android Studio 中查看哪些库可用于整个项目:
If you scroll down in the tree, you will find a "External Libraries" branch of the tree that you can expand:如果您在树中向下滚动,您将找到可以展开的树的“外部库”分支:
This lists all of the libraries available to the whole project, including those from tests, transitive dependencies, etc.这列出了整个项目可用的所有库,包括来自测试、传递依赖等的库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.