Importing android-crop library in my project - android

In my app I want to implement android-crop library: https://github.com/jdamcd/android-crop
I'm using eclipse. I have installed gradle plugin , but I'm new in gradle and I don't now how to import this library in my project and use it. When I import this library I get project like on image, but I can't launch this example application.
Can some one tell me how to import library in my project and how to use it.
Thanks

If you are using Eclipse you should:
clone the repo locally
import the code in your workspace starting from lib folder. The Wizard will import the code in lib/src/main. I suggest you naming it "croplib" (or another name) instead of "main".
mark java(*) folder as source (click on folder -> Build-Path -> use as source folder).
mark croplib as Android Library (Properties -> Android -> Is library)
Clean and build
I suggest you switching to Android Studio.
In this case, just open your project and add this dependency to your build.gradle file.
compile 'com.soundcloud.android:android-crop:0.9.10#aar'

Related

Adding Box2d extension to Android Studio

Downloaded Box2d from here but after going
Project Structure > New Module > Import existing library
When asking for path i put the box2d path and still get the warning that doesnt let me continue
Select modules to import
What is the problem?
Don't add PhysicsBox2D as Module, Download the JAR From this link :-http://www.java2s.com/Code/Jar/o/Downloadorgandengineextensionphysicsbox2djar.htm
and copy jar and paste in project library folder.
And then go to File->Project Structure-> app->dependencies-> + ->File Dependency -> lib ->add that jar file.
And if want to check that box2D is added or not try to import that:-
import org.andengine.extension.physics.box2d
in MainActivity.java. If importing Box2D is set in Project.

Is it possible to import only the jar files of a library project. For example: Aviary, telerik, facebook

Is it possible to import only the jar files of a library project. For example: Aviary, telerik etc.
I am using the above features in my project. While i have done the samples i have to import the SDK projects into our workspace. Can we import only the jar files into our projects and use the above features in our app?
You can copy those jar from a library project to your lib
or
Right click on project-> properties -> java build path -> add jar -> project source lib project->lib->select jar ->ok->ok.
Hi #Jafeena for facebook 3.14 this is not allowed.
whats the problem, why not to add all of them as a library, if problem is related to same name then change library name with Eclipse->refractor functionality and use them as your library.

Using libraries in an android project

I have found a library that I'd like to use for my android app. On the github page of the project, there is a tutorial on how to add the library to your own app so that you can use it, but I have problems following it: https://github.com/gabrielemariotti/cardslib/blob/master/doc/BUILD.md#reference-this-project-as-a-library-in-eclipse I know how to add .jars or projects as libraries to my own project using eclipse, but I don't get the library into my workspace in the first place.
In Eclipse, File -> import -> Android (NOT General) -> Existing Android Code into Workspace -> Select the library folder -> you should see the library
If the import option is not given, make sure you don't have any project by name "main" in your workspace. If you do, rename that project to something else and repeat.

How to import an existing Android Library project into Eclipse workspace

I see there are powerful support projects out there like this one: https://github.com/JakeWharton/Android-ViewPagerIndicator
All the tutorials and posts I have found describe:
what an Android Library Project is
how to create one from scratch
how to reference one after it's already in your Eclipse workspace
But I haven't found the correct steps for how to do an import into eclipse for such a project.
I have tried to create an empty Android library project and then copy over the files; and then also tried to link to the library project root folder in the eclipse project config for another empty project. Those didn't work.
So my question is .. what's the correct way to import the ViewPagerIndicator project into my Eclipse workspace?
Thanks
Right click on Workspace - > Import -> Existing Android Code Into Workspace -> Library Folder
Note:
To avoid other inconveniences, do this:
1) Once is already in your Workspace, make sure that the project is marked as "Library." Right click on Library -> properties -> Android -> Check Is Library
2) At the time of importing, change the name of the folder. Please, specify something different than just "library". Projects on github usually come that way.
3) Make sure that every file is in the folder. For instance, Eclipse won't import anything if project.properties is not inside the Library folder. In a similar situation, Eclipse could import the project, but it would not create the R.java file if something is missing or there are errors in the layouts of the library.
4) Make sure that all dependencies match with your project. For instance, if certain library needs android-support-v4.jar, make sure that both (project and library) share the same version of the file. Once again properties -> Java Build Path -> Libraries -> Add or remove Jars
5) To make your project dependent of the imported library, Right Click on the project -> properties -> Android -> scroll until the end and add the imported library.

How to add java project as library in android project using eclipse

Can anybody tell How to add java project as library in android project using eclipse?
As is explained in the documentation, you can go into project properties (e.g., Project > Properties from the Eclipse main menu), go into the Android section of the properties dialog, and use the Add... button in the Library group box to pick an Android library project from the available libraries in your workspace.
Maybe take a look here..
Import source java project in Android project
Or you can create a jar file from your project and import it as external jar as described here
hope it helps
For Library Project:
Rightclick->Properties->Android-> tick Is Library
For project in need of import:
Rightclick->Properties->Android->Add...->Library Project

Categories

Resources