i just got the volley library from the below link..
git clone-https://android.googlesource.com/platform/frameworks/volley
in eclipse i am following steps
import>git>project from git>....etc
and the library got downloaded in C:\Users\active\git\volley
when i just want to import the volley folder to the eclipse(C:\Users\active\git\volley) it shows "Select at least one project" in IMPORT PROJECT.and their is only one project though i have selected that still it shows the same error on the top..seriously need a help...thanks in advance
You need to build the jar and then add it to your libs folder in your project.
How to build the jar:
$ git clone https://android.googlesource.com/platform/frameworks/volley
$ cd volley
$ android update project -p .
$ ant jar
source
Here is a YouTube video if that would help: https://www.youtube.com/watch?v=5bwn7DYt2AI
You can also download a non-official build on maven central.
Edit:
It looks like volley can't be built with ant anymore (correct me if I'm wrong). All I did was create a new Android Project, mark it as a library project, create package com.android.volley, copy the source over to the project, and build it.
Check whether the project name is already exists in your workspace.
Right Click any project and click on properties.
Look at the directory of current WorkSpace under location.
Delete any existing copies of Volley or project with the similar name.
Re-import Volley.
Related
How to add gradle library in android project.
We download the project from github.
https://github.com/michael-rapp/ChromeLikeTabSwitcher
We follow these step but it showing the error.
Import the library folder from above zip as Android project.
It create folder of main with blank src, so we copy the data from folder java
to src.
After refresh in eclips it's showing error in src folder of functions.
We also import example folder and follow the same step as above, but no luck.
Let me know if i do something wrong or can you test this library on your eclips.
Thanks..
Download archive android.jar from https://jar-download.com/download-handling.php in Downloads folder. Then connect it to android project in Eclipse by means of project Properties/Java build path. That is all.
This will be the universal solution for all your eclipse android projects while android.jar is in Downloads folder.
I was reading https://developers.google.com/cardboard/android/download. It said to download libraries which happened to be jar files. I've found how to add jar to my project in Android Studio. The question is
1) Can I add them to Studio so that in next projects I can use the libraries by just adding "import" line and how?
2) For the example it says "git clone https://github.com/googlesamples/cardboard-java.git". I don't know Git. I downloaded the example which is zip of file directory. Can I just open it in Studio without the "git clone" command and how (by the way, example contains jar libraries mentioned in point 1)?
Thank you very much!
You can work with project without using "git clone".
Download project archive, unpack it and open in AS with File - New - Import Project.
I'm having a lot of trouble figuring out how to build a jar of the Showcase View library so that I can import it into my application.
I've searched all around but can't find a process for it. I tried importing into Eclipse but I can't get it in there since it isn't a project and I'm not sure what type of project to create from source with.
Any help would be greatly appreciated.
Easiest way is:
Create an empty Android Application project in your Eclipse workspace.
Copy files in ShowcaseView/library/ folder of github to your new project base folder.
Refresh project in Eclipse.
Goto project properties - Android and select "Is Library"
Clean unnecessary stuff and build.
It should be ready to add as dependency of your app.
Alternatively you can pick another library project .project file and copy it inside this library folder, edit it to match your new project name, etc... And then import in Eclipse. But this is more hardcore if you don't know what you're doing.
Sorry for the long title, here's the jist:
I have a android application project which I'm hosting on bitbucket.
There is a library on github I'd like to add as a dependency.
I'm unsure of
How to add the github project as a library to my Eclipse project?
How this will work when pushing/pulling from Bitbucket?
Thanks, David.
Setting your dependency as a library: you'll have to clone the project to a local folder, import it as a project into Eclipse, and in your project configuration you'll have to set the library project as a library: do a right-click in the project's name, go to Properties and under "Android" click in the checkbox "Is library".
Adding the library to the main project: In your main project, go to project properties the same way, and under "Android" click in the "Add" button and add a reference to your library problem.
More details here: http://developer.android.com/tools/projects/projects-eclipse.html
git: if you don't want to put the library's source code into your project you can add it to a .gitignore file and download it manually everytime you clone your project from Bitbucket. You can also take a look at git submodules: http://git-scm.com/book/en/Git-Tools-Submodules . Sorry but I never used them to give you more details.
If the library is a .jar file, you can simply paste it into the libs folder of your app. Android should automatically add it to the build path. As far as pushing/pulling from BitBucket goes, as long as you add the .jar file in git the library will be committed like any other file.
In my android project I am writing a program to connect to a server and below are the libraries that I need to use.
But I get an error saying the following cannot be resolved. How to resolve this error? I am using eclipse JAVA EE on Windows.
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
Add these two dependency
compile "org.apache.httpcomponents:httpcore:4.2.4"
compile "org.apache.httpcomponents:httpmime:4.3"
It will work.
Download the jars from the apache commons site and add them to project and path.
[Edit] now in Apache HttpComponents http://hc.apache.org/downloads.cgi
I know this is an old thread but it make be worth mentioning that these jars are now included in the eclipse Android ADT bundle (for MAC anyway, I have not checked for Windows). You do need to check the version is the one you want, but if it is you are good to go.
This means you can add them to your project without having to download them separately first - just follow these steps:
First right click your project and select properties as shown below:
Then select Java Build Path from the pop up window:
and now select the 'Libraries' tab:
and click on 'Add external JARS' and navigate to your ADT bundle/sdk/tools/lib/httpclient (httpmime etc), and then just click open:
You also need to import the Jar file itself into your project. I found the best way to do this was to simply copy the JAR files into the 'libs' folder in your project - i.e. CTRL C and CTRL V, or normal drag and drop file copy. To be safe I would refresh (right click project and select refresh - see menu in first picture above) and then clean your project.
Note if you do the Build Path part above correctly but forget to add the JAR files themselves into your 'libs' folder, you will get an error like:
'Caused by: java.lang.NoClassDefFoundError: org.apache.http.entity.mime.content.FileBody'.
To resolve this just copy the jar files into the 'libs' folder in your project.
You should now be good to go!
download the jar from here : http://commons.apache.org/
install it in your project like this:
Right click on your project and go to properties.
On the left tab go to "java build path". And in that on right go to libraries.
Click on add external jars and give the path of the jar and your library is added.
try to download it from HttpClient Downloads
Download the JAR file "httpmime-4.0-beta2.jar" and add it to your project
If you are using android studio add the following import to your code:
import org.apache.http.entity.mime.content.FileBody;
The IDE will give you an error under "mime" and ask you if you would like to install the dependancy. So if you say yes it will search for it online and then you can download it to app/build/libs directory.
FileBody will then be recognized after this process is complete.
Add
compile files('libs/httpcore-4.3.2.jar')
compile files('libs/httpmime-4.3.4.jar')
to your build.gradle.
Before that download .jar from
http://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/
http://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime
and to your apps>lib folder.