Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I import material design library to Android Studio?

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:

Error:Dependency MyApplication.libraries:MaterialDesign:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: C:\ADTBundle\StudioWorkspace\MyApplication\libraries\MaterialDesign\build\outputs\apk\MaterialDesign-release-unsigned.apk

What would be a step-by-step guide to solve this problem? Or what would be a gradle dependency for this library?

like image 216
Saman Sattari Avatar asked Dec 08 '14 18:12

Saman Sattari


People also ask

How do I add a library project to Android Studio?

Navigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Library Dependency in the dropdown. In the Add Library Dependency dialog, use the search box to find the library to add.

What is Android design library?

The Design library, AppCompat, and all of the Android Support Library are important tools in providing the building blocks needed to build a modern, great looking Android app without building everything from scratch. Labels: Design , Develop , Featured , io15 , Material Design , Support Library.

Does Android use material design?

Material design in Android is one of the key features that attracts and engages the customer towards the application. This is a special type of design, which is guided by Google.


2 Answers

There is a new official design library, just add this to your build.gradle: for details visit android developers page

implementation 'com.android.support:design:27.0.0'
like image 142
Oded Breiner Avatar answered Oct 16 '22 09:10

Oded Breiner


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 remove applicationId and set minSdkVersion to match your project minSdkVersion.

  • And in your project build.gradle file compile project(':MaterialDesignLibrary'), where MaterialDesignLibrary 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.

like image 27
Sachithd Avatar answered Oct 16 '22 09:10

Sachithd