1

link I want add the dfu library to my project. it has a download oètopn, but there is no direct download and it says to use Gradle to add it.
Anyway, the documentation says to do this step.

Clone the project, or just the DFULibrary folder (using sparse-checkout) to a temporary location.

Copy the DFULibrary folder to your projects root, for example to AndroidstudioProjects.

Add the dfu module to your project:

Add '..:DFULibrary:dfu' to the settings.gradle file: include ':app', '..:DFULibrary:dfu'

Open Project Structure -> Modules -> app -> Dependencies tab and add dfu module dependency. You may also edit the build.gradle file in your app module manually by adding the following dependency: compile project(':..:DFULibrary:dfu')

But I can't find the DFULibrary folder in this project .

Community
  • 1
  • 1
  • Please show your app gradle file – Dileep Patel Oct 24 '16 at 06:48
  • You say "but i cant find DFULibrary folder in this project". The instructions say "Clone the project" [...] "Copy the DFULibrary folder to your projects root". Have you copied the DFULibrary folder into your project? – Barend Oct 24 '16 at 06:49

3 Answers3

3

Add in your build.gradle

dependencies {
    compile 'no.nordicsemi.android:dfu:1.0.4'
}
Donald Wu
  • 698
  • 7
  • 20
2

I started using it today. It is a bit different.

Use menu File -> Project Structure -> Modules.

enter image description here

Click to choose library dependency enter image description here

Search the library that you want to add in your project and click on to import. enter image description here

dependencies {
    compile "com.android.support:appcompat-v7:28.0.0"
}

Hope this will help you enough.

0

Go to http://gradleplease.appspot.com/ and search for the library you want.

Go to build.gradle file and add it under dependencies{...} module and add that line and hit the sync button

dependencies {
    compile 'no.nordicsemi.android:dfu:0.6'
}
Amey Jahagirdar
  • 455
  • 1
  • 4
  • 14