Add facebook SDK to IntelliJ Android project? - android

How can I add the facebook sdk to my android project in IntelliJ? I'm familiar with how to add a library project to an existing project in Eclipse, but not in IntelliJ. Anyone know how?

The answer below is outdated, please refer to the actual solution.
If it's just a jar, you can add it to the module dependencies.
If you want to use Android Library with source code, you need to create a new Module in IDEA with Android Facet and specify in the facet settings that it's Android Library Project. Configure module content and source roots and then add this module as a dependency to your Android application module.
Here are the screenshots for the Facebook SDK Android Module configuration in IDEA:
Note that the root of the module is set to the facebook subdirectory from the GitHub repository and Is Library Project checkbox is enabled.
If you add this module as a dependency to your application, everything should build fine.
I've also uploaded a sample project that consists of simple sample provided with the SDK and this facebook API module as a dependency, you can download and use it for reference.

Remove if inappropriate - but this solution was much more relevant for the latest version of IDEA and the latest Facebook SDK: https://stackoverflow.com/a/14732898/1711200
Tested with IDEA 12.1.2 and Facebook SDK 3.0.1
My reason for posting this is because the directory structure for the latest Facebook SDK is different & makes this post outdated. I also kept getting directed to this thread, whereas the thread I've linked to is a better & more relevant solution.

Related

Add firebase cloud messaging support without gradle or android studio assistant

I'm trying to add firebase support to an existing application.
I followed the documentation (Firebase and android) but everything is about gradle.
The app i'm working with was made on Intellij and I don't have gradle on my project, It would be a little bit tricky to migrate to another IDE.
So here is my question, can I add firebase cloud messaging support without gradle ? I have some libraries included in my project under .jar files but I wasn't able to find any .jar files for firebase (and I guess there is some dependencies)
Edit: I found this: https://developer.android.com/studio/intro/migrate
It's possible to integrate firebase without Gradle file. For that, there is three way to integrate firebase without Gradle. But, I suggest you, to migrate Android Studio from IntelliJ developer tool.
Still, you do not want to migrate three ways are as below:
Copy firebase SDK in your project and then use it as you want. Download firebase SDK for Android from below link.
Download Firebase SDK
Note: It's not a good way to integrate firebase SDK into your project. Because when you use the above way then it will be about specific version SDK which will difficult to update with a new version after a long time for an application update you are trying.
Use Maven to integrate firebase in your project. For taking maven for firebase SDK go to below link. From below link, you will find different maven for a different product by Firebase.
Firebase SDK Mavan
Note: I am not sure about using maven in an android project will work properly or not. But you should have to try because of its easy way to update the new version of firebase SDK when new update available.
Add AAR file in your project. AAR file is same as a JAR file. So, you have to include AAR file which you can find from the above link for maven. For every product, there is a separate AAR file which you have to download and integrate it.
Note: I am not sure about to integrate AAR file in your project will work or not. But you should have to try to integrate it. It's also easy to update when new update available.
The best advice I can give you is to move your build to Gradle. You can then build your project from all IDEs including IntelliJ and also on the command line.

How can I import a Facebook Login Sample in Android Studio?

I am trying to integrate Facebook Login into my App and was going through the samples provided by Facebook on Github:
https://github.com/facebook/facebook-android-sdk/tree/master/samples/LoginSample
Above is the Login Sample that I want to try out but seeing the project structure, I could only see build.gradle and not any other standard Android project files. I tried importing this sample as a project but ended up with a incomplete project which doesn't recognize any Android Module, nor there is any aapt compiler configured. It also complains about the AndroidManifest.xml, assets folder, etc.
I tried, creating an Android facet through Project Structure settings, but still the project doesn't get recognized as a full fledged Android project.
Is there any way, I can have it as an Android project?
You just need to clone or download the facebook-android-sdk repository. Once you download it just try to open it in Android Studio, you will be able to access LoginSample or other modules as an Android Project.

Android Studio: Cant run cloned github project with samples because I am missing a gradle

I cloned this repository from github and opened it as a new project.
The project view shows no gradle and I cant run the provided samples.
How can I create or add a gradle to the project and run the samples?
The repository directory what you have mentioned is not an android project.
This is the URL for that wheel sample
Android-Wheel-Menu
and also it is developed in Eclipse. So better download it from browser. then load it from Android STUDIO.
What you cloned is not an Android application but a library for Android applications. Thus, it's not intended to be run standalone which is why you don't find a build.gradle. You need to create a new Android project and then follow the steps under "Usage" which explain how to integrate it in a project.
This library is marked as deprecated, so you might want consider using another one.

How can I incorporate Gradle into my existing project on Eclipse?

I have this structure below and wish to incorporate Gradle to my existing project in Eclipse. Using the Facebook SDK in my project because the Login button on the home screen.
I have two questions: the first is how to integrate Gradle, the second is the standard folders and libraries are correct (There's something telling me that the Facebook SDK folder should not be there). Accept any kind of suggestion.
Thanks!
Note: I tried using Android Studio and IntelliJ to be my main IDE but was unable to add the Facebook SDK to my project (As both use the Gradle, and I tried to reproduce what I'm doing in Eclipse, I think it made it impossible addition)
First, add build.gradle for your project (and its dependencies).
Gradle for Eclipse page may help.
Second, try to search for Facebook SDK for Gradle. For gradle it should be one .aar file, that you would declare in main app build.gradle as one-liner like
compile 'com.android.support:appcompat-v7:19.0.+'

Pre-alpha Mapbox integration into Eclipse Android Project

I have an existing Eclipse android project that I would like to use the pre-alpha MapboxSDK with. I have tried using gradle to try to build the library into my project, but have been unsuccessful. Is there someone out there that would be able to detail a step by step procedure for importing and integrating the SDK into an existing project?
Best place to ask would be on the issue tracker for the project, and to share the specific error that you happen upon in trying to set the project up.

Categories

Resources