How to import android open source library? - java

I tried to use Android-PullToRefresh in my project.
I am used to importing library by "File -> New -> Other... -> Android -> Android Project from Existing Code" in Eclipse, but this time, it said that "Select at least one project" when I choose the "library" folder in that project.
What is the correct way to import this library? Please help. Thanks!

If your workspace having the project with the same activity name as the activity in your library, this time also it will show select atleast one project. check if you work space contains any

If you are trying to import a library into Eclipse, then you may refer to this post Adding a library/JAR to an Eclipse Android project
If you are trying to import the project, then you select the entire project folder.

Related

How do I import an AIDE project into IntelliJ?

"AIDE" is an IDE for Android. It handles Java, Native Development, HTML dev, etc.
More specifically, I am trying to understand how I import a template LibGDX project started in AIDE, and open the project for running in the normal IntelliJ IDE, not the specific JetBrains Android Emulator version.
I imported the project, but cannot understand how to compile and execute the project, and I suspect I have imported the project incorrectly.
Can anyone help me to understand the process for this?
For IntelliJ 15, you must click "Import Project" on the into screen:
You then locate the ".project" file under "gdx-game" (or "gdx-game-android", but eventually you need to add both), and select it.
You will then configure the project settings, such as directory. You select
"$project_name$" if it is not already checked. You will also click
"Open Project Structure After Import":
Enter the name for the main project, and select the main SDK for the project:
You now navigate to the "Modules" section, and then rename the module ("project") from "$project_name$" to "gdx-game" (if you are in fact currently importing the "gdx-game" project).
You must also select the proper Module SDK to use in compilation of the project.
For "gdx-game", this would be a normal Java SDK such as Java SDK 1.7.
For "gdx-game-android", this would be "Project SDK (Android API 21 Platform)" by default, but if it does not appear you can select "Android 21 Platform(java version "1.7.0_79")":
You will now click the addition symbol, also pictured above (circled in red in image 4), in order to import the next module of the project ("gdx-game" or "gdx-game-android").
Again, you will navigate to the appropriate folder and locate the second ".project" file.
Upon import of the module, rename it in the same manner as you did with the first module. Alter it's SDK as well.
This should be all you need for a basic import of a project, but you may need to add libraries and such, depending on your projects needs obviously.

How to import one Eclipse project as a library into another?

I would like to use one of my eclipse projects in another one. Is there a 'smooth' way to do that, without having to export one as a jar file and importing it into another? Especially since I work on both project simultaneously, I would like the latest changes from the imported project to be automatically built and imported into the other one. Is that possible?
It is possible. Right click on your project -> Build Path -> Configure Build Path. Switch to the Projects tab and add one. It will work as a library.
P.S. You might also want to check this: Creating a java library with Eclipse
Answer to this question explains how to import your own library in eclipse.
Quoting from the answer.
Just have "Project" reference your "Library", on windows the process
is (using menu / tab names)
Go to: Project -> Properties -> Java Build Path -> Projects
Client Add...
Select your "Library" project from the list
Click Ok
Click the other Ok Now your done and you can use import for classes in your "Library"

How to import org.opencv.android.JavaCameraView?

I'm trying to use OpenCV 2.4.10 for Android in Eclipse.
But my example project cannot compile because of Eclipse can't find the org.opencv.android.JavaCameraView package.
See the picture please
http://prntscr.com/5wt2ek
How to fix this problem?
Have you add the OpenCV?
Like explained here:
Add OpenCV library project to your workspace. Use menu File -> Import -> Existing project in your workspace.
Press Browse button and locate OpenCV4Android SDK (OpenCV-2.4.9-android-sdk/sdk).
See more information:
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html

having issue with eclipse library

I am new to Droid development using Eclipse. I am trying to use PinnedSectionListView found here: https://github.com/beworker/pinned-section-listview
What I need to understand is how do I import that into my project? Do I need to load the project and create a .jar? I thought to use libraries like the one here it needed to be a .jar lib. I am a bit confused on how to use github libs like that. Also, not a big deal, I am fluent in c/c++/c#/objective c, but I am new to java. Code I can handle, eclipse ide, jar files, etc. not so much.
Any steps would be helpful, or a pointer to an example. Thanks for any help.
You have to download the library folder! Then import it in your Eclipse from the File menu! After you have done this, you have to right click your project and reference the imported library as a library project in your original project!
http://www.androidbegin.com/tutorial/implementing-actionbarsherlock-in-android/
This is a link for another library but the steps are the same.
Download and unpack the zip file
In Eclipse's Package Explorer, right click and select "Import..."
In the Import dialog, select "Existing Android Code into Workspace"
Select the dir of the unpacked file, and click "Finish", the library is now part of your workspace, which leaves the last thing to do:
Right click on your primary project and select "Properties", in the Properties dialog, select "Android" in the left panel, then click on "Add" button on the right side of the panel, select the library, click "Ok". Now you are ready to use its classes and resources.

Import java project into eclipse

I just downloaded a Google App Engine sample Java project. I am trying to import it into eclipse. If I chose file/import/existing projects into workspace, and navigate to the appropriate directory, it doesn't find any projects. I'm speculating this means that dotmatrix is not an Eclipse project. How can I import it?
Thanks.
Project you are trying to import doesn't seem like Eclipse Project.
You can still use this project in Eclipse as Java project by following these steps:
Open Java Perspective in Eclipse.
Right Click in Package explorer pane and select New >> Java Project.
Give appropriate name to your Project and click the option that says "Create project from existing sources."
Select root dir of project downloaded and click finish.
Note: You may need to configure source folders, library and other build paths to complete setup.

Categories