I know there are already similar question but I still could not find a way to do this. I want to use this github project in a new android app. Could anyone elaborate how to do that ?
It's easy.
For example, you want to add the library which is given below.
1)just take compile link --> compile 'com.intuit.sdp:sdp-android:1.0.2'
2)add it in app level gradle
dependencies {
compile 'com.intuit.sdp:sdp-android:1.0.2'
}
3)sync project
Now u can use easily this github library.
EDIT:
In the latest version of Android Studio implementation must be used instead of compile
So,
compile 'com.intuit.sdp:sdp-android:1.0.2'
becomes,
implementation 'com.intuit.sdp:sdp-android:1.0.2'
First,you need to download the project .Then,you should follow the steps below,in you project,chose Android studio File->new->import module.Find the path of the project which was downloaded just now into Source directory.The last step ,into project structure select dependencies, chose Module dependency,click Ok.So,you can use the github project in you new android app.Sorry,my english is very pool ,hope that can help you.
Related
I know that in order to get the latest version of Android/Google libraries, I can always go to the Android SDK Manager and update the Android Support Repository / Google Repository.
How about to update the other dependency libraries, such as the "commons-net:commons-net:20030805.205232" from Apache collection libraries? Since it is able to add these libraries from a Module's dependencies, I assume there should be a way to update it within the Android Studio IDE, but so far all the solutions I found is to download the specific .jar and put in the libs directory.
Just curious if anyone know there is a way to update these libraries from within the Android Studio IDE like the Android/Google dependencies.
Android Studio & IntelliJ have a dependency setting window themselves. Though, it does not have a "update" feature as the SDK Manager does. Reason being: Updating a library can cause bugs, errors, or complete crashes in your app.
so far all the solutions I found is to download the specific .jar and put in the libs directory
Not sure where you read that... Remote Gradle dependencies are preferred in most cases.
such as the "commons-net:commons-net:20030805.205232"
Go find what you want in Maven Central, find the most recent version, click the "Gradle" tab, the copy that into your build.gradle section.
There is no automated process for this, as far as I know, though you should be able to auto-complete version numbers via the IDE while you type it out.
When you create a project under Android Studio, it generates for your gradle files which let you use dependencies. Gradle is like maven, you can find lot of documents on google.
Under "Project" tab -> Gradle Scripts -> build.gradle (Module app), you'll find something like this :
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.journeyapps:zxing-android-embedded:3.0.2#aar'
compile 'com.android.support:support-v13:23.4.0'
compile 'com.google.zxing:core:3.2.0'
compile 'com.android.support:support-v4:23.4.0'}
So you just have to put your dependencies and gradle will download them for you.
More here.
I've found this library to be used with android: https://github.com/Yalantis/uCrop
I understand the Usage instructions, but as I never used a library before, I don't know how or what should I copy to make run the sample project.
I'll appreciate any help with this.
If you use Android Studio, it is very easy to include libraries in your project.
Just find file named build.gradle in app folder, in
dependencies block add compile 'com.yalantis:ucrop:2.2.0'
dependencies {
//HERE WILL BE SOME ANDROID LIBRARIES
compile 'com.yalantis:ucrop:2.2.0'
}
I am trying to use material designing library https://github.com/drakeet/MaterialDialog from github in my eclipse but I didnt found any jar file in this library project. So how can I use this library in my project in eclipse
If you have a Gradle build, as mentioned in the README, you just add:
dependencies {
compile 'me.drakeet.materialdialog:library:1.2.2'
}
As explained in the blog post, this looks like (in Android Studio)
You have to convert this library project from gradle to eclipse. You can get many links over the web for it. Try this.
The library project you are looking is build into android studio(Gradle). So I recommend you to use android studio instead of eclipse.
I recommend you to use Android Studio with Gradle support by default. But if you want use Eclipse download Gradle plugin and add this lib as dependency
dependencies {
compile 'me.drakeet.materialdialog:library:1.2.2'
}
eg.
`dependencies {
compile 'me.grantland:autofittextview:0.2.+'
}`
Where do i add this and how to make it work? i am trying to incorporate autofit textview in android
Find the build.gradle for your project, add the compile statement to the existing lines in the dependencies section. Android Studio will prompt you to "Sync Gradle Project Files", which will trigger everything required to find the library. After the sync you'll be able to import and use the classes as required.
If you want to use this then you need to have an Build-Management Tool like Maven, Ant or Gradle. Then this Tool downloads the dependacys for you.
But if you dont have something like this then just add this file to the project:
http://repo.maven.apache.org/maven2/me/grantland/autofittextview/0.2.0/autofittextview-0.2.0-sources.jar
I'm new at GitHub. I found a library that I want to use in my Android project (Glide), but I don't know how.
After downloading the source code I'm stuck with a zip folder that I don't know how to import it into my project. I'm working with Android Studio.
Any help?
Thanks.
Unzip the downloaded project. Open YOUR project in Android studio. Click File -> Import module. Add this module as a dependency to your project. You should be good to go.
[EDIT]
BUT, since Glide has gradle/maven support, I can just simply modify your project's build.gradle file and add the following lines to the dependencies group:
compile 'com.github.bumptech.glide:glide:3.3.+'
compile 'com.android.support:support-v4:19.0.0' // You might need to increase the version numbers if the libraries have never versions