https://github.com/ankushsachdeva/emojicon
How do I add this library into Android Studio so that I can use it in my project.
Usually I add a line into my build.gradle file?
I had faced same problem recently. I know it is too late to answer this. However, I am still sharing my findings in case if someone finds it useful in future:
Download 'emojicon':
Download source from here. Lets say you've downloaded it in D:\Emojicon
Import library D:\Emojicon\lib to your project:
In Android Studio go to File->Project Structure then click on '+' symbol. From the dialog box pops up choose appropriate option to import library.
(For e.g. on my system I have Android Studio 2.1.2, it shows me "Create New Module" dialog then I choose "Import Eclipse EDT Project")
Then select D:\emojicon\lib to import emojion library to your project. It will copy emojicon project to your project.
Set dependency:
Then click on Dependencies tab (in dialog options box from File->Project Structure). From the list that appears on left side, click on your project under modules.
You will see all your project dependencies. Now click on '+' symbol from top right corner and select "Module dependency". The dialog next will show "lib" as module. Just select that and click OK to close dialog. Close Project Structure dialog also. That's it! You have successfully imported emojicon library and have set its dependency.
Implement:
Now refer example project to see how to use emojicon in your project (Its basically using EmojiconEditText and EmojiconEditView instead of EditText and TextView)
Related
I am trying to work on an android app using Android Studio and I want to use the SlidingMenu github project in my app. This github project appears to be related to Maven (Disclosure: I've never used Maven before).
I want to be able to reference its classes in my Android Studio project.
I tried to create a new module, but that it creates its own directory structure. I want to just import the existing file structure of this github project (so I don't change anything related to it).
Can anyone tell what is the recommended way to do this. Thanks.
if this library can be found in maven central search, you can just go to
file
project structure
while selected in the left "app" under modules
go to Dependecies tab
click + button on the right and choose library dependency and search for your lib.(there is another sliding menu lib then yours i think)
use it in your code
otherwise:
if you want to add the library you posted, download it and go to
file
project structure
click + button (top left corner this time)
in the new window select "import gradle project " choose the folder of your lib (if it will not do this, choose the library folder inside it(idk this lib)). i think it will import your lib
then go to dependencies tab
click + button and choose add module dependency this time choose your lib and your done
use it in your code
have fun
I am trying out android gcm in eclipse. I have successfully completed the http server implementation but then i get an error in the manifest file around #integer/ play.
I have tried importing the jar manually but it doesn't work.
Any help?
Follow the instructions carefully.
Make sure that both the project library and the application project that depends on it are in your workspace. If one of the projects is missing, import it into your workspace.
In the Package Explorer, right-click the dependent project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Click Add to open the Project Selection dialog.
From the list of available library projects, select a project and click OK.
When the dialog closes, click Apply in the Properties window.
Click OK to close the Properties window.
Basically, you have to import the Google Play Services project, then add it as a library in the project.
I just downloaded the new Android Studio to my mac and tried importing my projects to it without creating a gradle file for them (since I had some issues importing it, and I saw it's not necessary).
I went to file>import and chose my parent project, imported all the libraries to the project yet still I get this error:
import com.facebook.Session;
Cannot resolve symbole 'Session'
any thoughts on how to successfully import this into the new IDE?
As I just learned you have to to it like on IntelliJ IDEA 12 CE:
Open Project Structure (Press F4 on your project).
Select Modules on the left pane.
Choose your project and you will see Dependencies TAB above the third Column.
Click on the plus sign in the bottom. Then a tree-based directory chooser dialog will pop up, navigate to your folder containing facebook jar, press OK.
Press OK.
If the library is in the /libs-directory just right-click the jar and click 'Add as library'. This will add the library to your classpath.
I'm working on an Android 4.1.2 project, where I'm trying to add a reference to this github project
Following this guide, I've imported the project into the same workspace, and I'm able to select and add the library and get a green checkmark. When I press "Apply" or "OK" the dialog closes, and nothing happens (no rebuild). Then, when I again try to see if it's added, it's not there - not even with a red cross.
I've tried running the project anyway, but it gives me java.lang.ClassNotFoundException: com.handmark.pulltorefresh.library.PullToRefreshGridView
First I choose the library, get the green checkmark
Then I press "Apply" and "OK", and dialog just closes and don't build. When trying to see if library was added, it's not there:
Any suggestions about what's wrong?
Did you or did you not check the "Is Library" option?
You need to reference that library in your android project. Assuming you have imported the library project to eclipse, right click on your project, goto properties, choose android , click add, browse and add the library project.
Clean and build and run. Check if you need to add support library for running on lower versions
Import the library and your project in the same work space. then clean the project and try to add library by the same process you are doing(Properties --> Android --->Add).
Also try restart eclipse.
I have created a new android project. I want to have a action bar at the top so I downloaded the Action Bar for Android Library because I want to support devices from android 2.1.
The description says
The action bar component is an Library Project. This means that there's no need to
copy-paste resources into your own project, simply
add the action bar component as a reference to any project.
I am new to android so what does this mean? How can I add the library to my existing project?
Import the library into your eclipse workspace:
File->Import->General->Existing Projects into Workspace, Next
Select root directory: /path/to/project
Projects->Select All
At this point it fails because there is nothing to select and the next button is deactivated.
Any ideas?
File->New->Other
Select Android Project
Select "Create Project from existing source"
Click "Browse..." button and navigate to johannilsson-android-actionbar\actionbar
Finish (Now action bar project in your workspace)
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
Checkout this documentation on how to reference a library project in eclipse.
From the link above:
In the Package Explorer, right-click the dependent project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Click Add to open the Project Selection dialog.
From the list of available library projects, select a project and click OK.
When the dialog closes, click Apply in the Properties window.
Click OK to close the Properties window.
Plus to the "best answer", at step 8, if you don't see the project, go to the project what you would like to add as a library and
open 'project.properties'
add 'android.library=true'
and you can again follow the instruction and you should see the desirable project.