问题描述
我想在 v1.0.0 rc2中将这个库导入到我的项目中:
但是有一个问题。当我将这个库作为模块添加时,出现这个错误:
解决这个问题的分步指南是什么?或者什么是这个库的gradle依赖项?
如果您使用的是Android Studio:
-
您可以将项目作为模块导入,并在
build.gradle
文件中更改以下内容导入模块。 - c $ c> com.android.library
删除applicationId
并设置minSdkVersion
以匹配您的项目minSdkVersion。 -
并且在您的项目中
build.gradle
文件compile project(':MaterialDesignLibrary')
,其中MaterialDesignLibrary
是您的库项目的名称,或者您可以通过文件 - 项目结构 - >在模块 - >依赖关系 - >点击+添加模块下选择您的项目。
I want to import this library to my project in Android Studio v1.0.0 rc2:
https://github.com/navasmdc/MaterialDesignLibrary
But there is a problem. When I add this library as a module, this error appears:
What would be a step-by-step guide to solve this problem? Or what would be a gradle dependency for this library?
If you are using Android Studio:
You can import the project as a module and change the following in the
build.gradle
file of the imported module.Change apply plugin:
com.android.application
to apply plugin:com.android.library
removeapplicationId
and setminSdkVersion
to match your project minSdkVersion.And in your project
build.gradle
filecompile project(':MaterialDesignLibrary')
, whereMaterialDesignLibrary
is the name of your library project or you can import the module by File -> Project Structure -> Select your project under Modules -> Dependencies -> Click on + to add a module.
这篇关于如何将材料设计库导入到Android Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!