I'm using maven to manage my dependency, how can i add the facebook-androidk-sdk 3.0.1 as library project in pom.
Where i can get the latest code for facebook sdk 3.0.1
I treed to build the apk, but I'm gettting following error please advice how to fix this issue
'drawable' with value '#drawable/com_facebook_picker_list_selector_background_transition'
Samith
The Facebook SDK is a normal Android library, in order to use it with Maven you need to do the following:
Create the apklib
Install the apklib in your local or remote repository
Add the apklib dependency to your project pom.xml
Take a look at the documentation for commands examples:
https://code.google.com/p/maven-android-plugin/wiki/ApkLib
You can obtain the Facebook SDK here: https://developers.facebook.com/android/downloads/
Related
I'm following a tutorial to integrate facebook sdk in my android project, I'm using eclipse currently , tutorial is asking me to define repositories { mavenCentral() } in build.gradle file , but I don't know in which file I've to add this in eclipse... ant.properties, project.properties or any other file?
I've read some related threads , but I could not find in which file I've to change.
Defining Repository in Maven
maven repository eclipse project
You are working in Eclipse and the tutorial asks you to add the Maven central to your Gradle configuration which you (properly) don't have in Eclipse.
You basically have two options:
Get a Gradle plugin for Eclipse (like this: http://marketplace.eclipse.org/content/gradle-integration-eclipse-44)
Get Android Studio (http://developer.android.com/tools/studio/index.html), where Gradle is already an integrated part of the IDE.
Both options means that you have to get your head around what Gradle does, and how it works, but it'll properly be worth the effort.
A have some problem with adding external maven libraries to my Android Gradle project.
My application need Facebook SDK and YouTube API to work propertly.
I just download facebook SDK, create module and add dependecies in Project Structure and it work perfectly. In the case of YouTube, Google does not provide gradle SDK, but only Maven sample project.
When I just import that project, Maven download all dependecies to external librares and I can run sample codes, but I can't use this in my android project.
My question is: How to add Maven Youtube libraries to Android Gradle project ?
Thanks for answers.
have you tried compile 'com.google.apis:google-api-services-youtube:v3-rev107-1.18.0-rc'
I have created a new Maven project, using android-quickstart artifact Id. There is no error and apk runs on a mobile phone - okay.
When I download Holoeverywhere project from git and link it with my project as a library, it also works.
But I want to link Holoeverywhere to my project using Maven (pom.xml). It's better to import everything using pom.xml than Import->...Use Library...
Dependency in pom.xml itself shows no error, but pom.xml shows this error:
Same error shows up in all projects with apklib dependency in pom.xml. Some projects need these types of dependencies and I can't use them.
Does m2e-android 0.4.3 really support apklib?
We are standardizing our infrastructure for Android development and we are trying to incorporate dependency management to our Android library projects. My current track is using the maven android plugin with m2e-android. We have uploaded the Android artifacts to our Artifactory repository with the Android SDK Deployer. We also have an internal framework with a few libraries we can import into our projects and for most part it works fine.
The issue we are facing now is that apklib dependencies containing resource files are hard to set up. The maven plugin can correctly configure the classpath but if the apklib has resource files that needs to be referenced by the parent Android project, Eclipse is unable to find them unless you checkout the Library Project and link it to the parent project through ADT.
After reading m2e-android discussion on issue https://github.com/rgladwell/m2e-android/issues/8, https://stackoverflow.com/questions/6269816/creating-closed-source-android-libraries#answer-6270768 and APKLIB does not get installed in Maven Repo, I'm not convinced maven is the way to go until ADT properly support closed source apk libraries.
I'd like to know how are you handling these kind of dependencies on your Android projects. What strategies are there other than using Maven?
For reference, here's what we have tried so far.
No dependency management. All required jars are stored into the lib folder and pushed to the source control repo. Library projects are set up as subfolders and pushed to the source control repo for each project they are used in. Eclipse project settings are also pushed. Project built with standard ADT Ant script.
Jar dependencies into libs folder and library dependencies as git submodules. Project built with standard ADT Ant script.
Dependency management with maven, including library projects with apklib packaging. Issue with resource files in apklibs.
You can have an insight on how Facebook Android developers address their dependencies issues in this video: How Facebook Built Facebook for Android.
They use Buck for that. Buck is a build system for Android that encourages the creation of small, reusable modules consisting of code and resources. Buck is in github
This might not be the best solution for you but maybe for someone else.
With the advent of Android Studio and Gradle, we are no longer facing issues with project dependencies; Android or otherwise.
Gradle supports Maven dependencies in jar or apklib formats. Popular libraries have been exported to the apklib (aar) format and made available through Maven.
I have never used Maven before.
I am following these instructions to setup google-api-client-java for Android.
I have also checked out the sample applications and trying to build calendar-android-sample but getting some Maven related errors.
Are there any other steps to integrate google api's ?
I have these errors -
The container 'Maven Dependencies' references non existing library 'C:\Users\Salil.m2\repository\com\google\apis-samples\shared-sample-calendar\v2-1.1.0\shared-sample-calendar-v2-1.1.0.jar'
Error resolving version for plugin 'org.apache.maven.plugins:maven-deploy-plugin' from the repositories [local (C:\Users\Salil.m2\repository), central (http://repo1.maven.org/maven2)]: Plugin not found in any plugin repository
Error resolving version for plugin 'org.apache.maven.plugins:maven-deploy-plugin' from the repositories [local (C:\Users\Salil.m2\repository), central (http://repo1.maven.org/maven2)]: Plugin not found in any plugin repository
I think is more simple to just add the dependencies jars into your lib folder(from your project) and then add the lib folder to your dependencies path(you do this using your IDE).