Unable to import NineOldAndroids in eclispse - android

where can i download the "NineOldAndroids" and how to import it in eclipse. when i am trying to import it , i am getting a message "No projects are found to import". Can someone show me how to import it?

In eclipse to import the NineOldAndroid we just need a jar file which you can download by clicking here and download the jar and place it in your lib folder of your project and then
Step 1 - press Alt+enter and Go to Java build path.
Step 2 - click on Add Jar and add the jar file.
Step 3 - Click on export and order and check the jar file and click on ok.
For more reference see the images
I Hope this will help you..Happeee programming!!!!

Android Studio users can do this -
download the jar file from here: https://www.dropbox.com/s/d1eh3zilkwxue51/NineOldAndroid-2.4.0.jar?dl=0
and place it in your project /libs folder
then go to: File - Project Structure - Dependencies - (click + to add)
then select "File Dependency"
select libs/NineOldAndroid-2.4.0.jar and click OK
add to your class that uses it:
import com.nineoldandroids.(whateveryouneed);

Related

Android install external library

I want to use this library https://github.com/koush/ion in my project.But I don't understand how can I install it.I am using Windows 8 and Eclipse.How can I install ?
Download that project and put it in workspace of eclipse and import it from work space to eclipse and make it as library project and add it to your project.
Steps to import:
Right Click on package explorer
Import
Existing Project into Workspace
And then browse to the location where the project downloaded
Import it
Steps to add it as library to your project:
Right-click on your project -> Properties
In Android->Library section click Add
Select recently added project -> OK
That's it!
Now you can use it
You must perform the following steps:
Download ion project code.
Import it in your workspace using eclipse.
Right click in your current project and select Properties. The project properties windows must be opened.
Select Android option.
Go to the bottom of this tab and you can view the Library section.
Add the library dependency using the Add button.
I hope that helps!
You are probably better off downloading the jars vs the source.
https://github.com/koush/ion#get-ion
Download those two and place them in the "libs" directory of your project. If that directory does not exist, create it. From with your Eclipse project preferences, you can add those jars as dependencies.

Android facebook sdk import error

i had download facebook skd import it in my eclipse add v4 jar file and change complier to 1.6 but yet it give me error in class FacebookAppLinkResolver
import bolts.AppLink;
import bolts.AppLinkResolver;
import bolts.Continuation;
import bolts.Task;
above are not import
1.Open your project properties
2.Select "Java Build Path" from left side menu
3.Select "Libraries" tab
4.Press "Add External Jar"
5.MOST IMPORTANT STEPS :-
Select "bolts" jar file of "libs" folder of YOUR CURRENT PROJECT LOCATION(Path Should be
of your project only and not the android sdk).
6.Select "Order and Export" tab and "TICK" the checkbox of "android-support-v4.jar"
Download sdk for Bolts library from
https://github.com/BoltsFramework/Bolts-Android
and add this project with facebook sdk project.
Or if you're using Gradle you can add this to your Gradle file:
dependencies {
compile 'com.parse.bolts:bolts-android:1.1.3'
}
Facebook is also available so you don't have to add that manually either. To include both use the following:
dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.parse.bolts:bolts-android:1.1.3'
}
You can check for the latest version of Bolts here.
amalBit's answer works great for Eclipse. Here is the Android Studio equivalent.
I encountered this error after updating to the latest Facebook SDK for Android.
File ->
Project Structure ->
Select the Facebook module on the left
Select the Dependencies tab
Press the + button at the bottom of the
window
Select File Dependency
In the libs folder, you should see the
bolts.jar file you copied over when updating the SDK.
Select the
bolts.jar file and press OK
Then press Apply and OK
Doing a Gradle Sync (happened automatically for me) should resolve the error.
I had the same problem. Check your facebook-sdk/facebook folder to see if there is a libs file (Not directory)
So I think Android studio failed to import the libs as a directory instead included a libs file with "../libs" in it.
Not sure if this was facebook-sdk issue, git cloning issue or android studio issue.
Solution:
1. remove the dummy libs file
2. copy the libs directory manually
3. remove the dependency in project structure
4. add it manually by clicking + sign

ZXing-2.1 - Missing libraries

EDIT ::: For people who may be searching for a solution, Here it is.. (using ZXing 2.1)
Follow the steps below :::
First you have to import the existing code into your workspace
File -> import -> android -> existing android code into workspace
Browse to the unzipped folder of ZXing 2.1
You will have two projects in the list. Select both and click OK.
They will be imported into your workspace and you will have errors.
For the first Project (CaptureActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core
For the second project (ZXingTestActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core and android-integration.jar present in ZXing2.1\zxing2.1\android-integration
That's it.. You are done...
Hope this helps...
I have an application where we use ZXing. I have to update the library to the latest one. So I downloaded the code from ZXing-2.1.zip from here. When I try to compile I get errors in the import statements.
import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;
I couldn't find these libraries anywhere in the zip that I have downloaded. Can someone please guide me on how this is done? What am I doing wrong?
If you have a step by step tutorial, please do link them.
The classes are found in core.jar. You build this from the source code you downloaded.
I suggest you use the latest code from Subversion actually. If you do that, here's how you can get a pre-compiled JAR, or build one yourself: https://code.google.com/p/zxing/wiki/GettingStarted
(We are releasing 2.2 in a week or two by the way.)
Or if you want to build 2.1, see this previous documentation: https://code.google.com/p/zxing/source/browse/wiki/GettingStarted.wiki?spec=svn2659&r=2659
Extract zip
Right click on project-> properties-> Java Build Path-> Libraries-> Add External Jars-> select the jar file where it is in your Pc-> click ok.

Android: I am unable to import a project into my workspace

https://github.com/JakeWharton/Android-ViewPagerIndicator
I'm trying to include that library/project into my workspace, however nothing shows up when I choose the folder to import. I have no clue what I'm doing wrong as I use the same method to import other sample projects. There must be something different about this project.
Could someone try it out?
File->New-> Android Project
select Create project from existing source
Browse...->JakeWharton-Android-ViewPagerIndicator\library
Finish
if any errors in project exist,try next:
go to libs folder in eclipse Package Explorer
right click on android-support-v4.jar
Build Path -> Add to build path

Android libraries not found

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.

Categories

Resources