Android studio not recognizing Facebook library - android

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.

Related

AndroidBootstrap could not be found

How to solve it when I import eclipse project into my android studio
Image to understand issue
Edit 1:
Import Eclipse Project to Android Studio:
Start Android Studio and close any open Android Studio projects.
From the Android Studio menu click File > New > Import Project.
Alternatively, from the Welcome screen, click Import project (Eclipse ADT, Gradle, etc.).
Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok.
Select the destination folder and click Next.
Select the import options and click Finish.
The import process prompts you to migrate any library and project dependencies to Android Studio, and add the dependency declarations to the build.gradle file.
For detail description try this link
https://developer.android.com/studio/intro/migrate.html#migrating_from_eclipse
Edit2:
Well, there might be another way of solving this problem, but I ended up removing the line in the project.properties file that was making reference to the Android Bootstrap library.

Import emojicon Library Into Android Studio

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)

I deleted appcompat_v7 and now my Android projects won't work

I noticed there were many projects in my workspace named appcompt_v7_x with "x" being 1,2,3,etc...
I looked at them and, not knowing they were used by my Android apps, I deleted them all. Well, now my Android projects won't compile.
Common erros are:
import android.support.v7.app.ActionBarActivity; (import cannot be resolved)
import android.support.v7.app.ActionBar; (import cannot be resolved)
R cannot be resolved to a variable
The constructor of TextView, Button and other subclasses of View are undefined
If I create a new Android project, it will create an appcompat_v7 project but it seems to only affects new projects, the older ones don't recognize the new appcompat_v7. If someone can help I would be really grateful
Add the appcompat_v7 project to your application project as a library:
In the Project Explorer, right-click your project and select Properties.
In the category panel on the left side of the dialog, select Android.
In the Library pane, click the Add button.
Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
In the properties window, click OK.
https://developer.android.com/tools/support-library/setup.html#libs-with-res
As,by default android apps gets saved in "workspace" folder .All you need is to delete that folder (make sure that you save your projects somewhere else) then run eclipse again and create a new empty project ,and your problem would be solved
as automatically appcompat_v7 folder gets created ,as you create new project
Seriously,it worked for me..

Android studio import module button missing

I've got a long history with Eclipse, but I wanted to try Android Studio. So I created new project and now I want to add SlidingMenu library to it. I found some tutorials whose say to go to Project structure, click plus button and select Import module.
But there is no Import module option, when I click plus then New Module window pops up. I'm currenty using Android studio v0.3.6. Is now proccess to import module different?
Thanks
The Import Module feature has been removed for Gradle-based projects because it previously didn't do the right thing with your Gradle build files and it would put your project in a confusing state; it will be re-enabled when it's properly implemented. The bug tracking it is at https://code.google.com/p/android/issues/detail?id=62122.
In the meantime, to add a module, you need to write a build.gradle file for it by hand, add a reference to the module to your settings.gradle file, and if the project is still open in Android Studio after you make the changes, click on the "Sync Project with Gradle Files" button in the toolbar.
If you're not familiar with Gradle, you can get docs on the particulars of Android Gradle projects at http://tools.android.com/tech-docs/new-build-system/user-guide.

Android - Installing Pager Sliding Tab Strip in Eclipse

I'm trying to install the Pager Sliding Tab Strip library and demo app into eclipse, but I get errors on installation and compile errors.
the library is here: https://github.com/astuetz/PagerSlidingTabStrip
What I have done is:
downloaded the zip file from github,
unzipped it into a folder on my windows PC,
in Eclipse selected File|Import, Existing Android Code into Workspace, Next, browsed to the root directory \PageSlidingTabStrip-master
Copy projects into workspace
finish
This leads to an error:
Android SDK: Resolving error markers' has encountered a problem.
Marker id 3158 not found.
However, a node in my package explorer tree is created for each of the library and the demo project, but the have compile errors.
What does the reported error mean? Am I doing something wrong? What is the correct way to use this library in Eclipse?
Do the following:
File->New->Other
Select Android Project
Select "Create Project from existing source"
Click "Browse..." and navigate to "PagerSlidingTabStrip-master" folder which you have downloaded from https://github.com/astuetz/PagerSlidingTabStrip
Check "library"! (Uncheck "sample"). Make sure "Copy to Workspace" is checked as well.
Click Finish. Now "library" is added to your workspace as a project. There are some errors detected but ignore them. You can right click on "library", go to "Refactor", and change it to "Lip_PagerSlidingTabStrip" (optional).
Right-click on your project -> Properties
In Android -> Library section, click "Add"
Select recently added "library" project, click Ok and you're all set. Make sure "Is library" in this window is unchecked.
EDIT
If you have faced an error subject to "Project cannot be build until the build path is correct", try to Quick Fix it by this option: "Add android.v4.supprt to Lib_PagerSlidingTabStrip."

Categories

Resources