Facebook SDK is not working on Android Studio - android

I have follow Scott Barta solution to import Facebook SDK on the new version of Android Studio (here) but now i'm having trouble using this sdk.
When I import import com.facebook.android.Facebook;I can't run my apps, it keeps reporting error: package com.facebook.android does not exist and all my methods that refer to facebook are "deprecated".
Does anyone know where this could come?

I have been facing similar issues with the latest Facebook SDK update, if you're using Gradle, I'll strongly recommend you, to first try to do a Gradle Sync as you can see here:
https://stackoverflow.com/a/19932896/799162
If that doesn't work ( as my case) you can force gradle to download your dependencies as shown here:
https://stackoverflow.com/a/13567793/799162
as an extra thing to do, try to do a clean on your build.

Related

trouble importing google services

am having a problem with android, I have a project in eclipse, these are the errors:
the import com.google.android.gms.wearable.internal.ar cannot be resolved
the import com.google.android.gms.internal.ob cannot be resolved
I already added google-play-services.jar as we can see in this pic
and this is what I have in the SDK manager
Android development in Eclipse can be a frustrating experience.
If the flexibility is there, I would strongly recommend moving over to Android Studio: http://developer.android.com/tools/studio/index.html

Android.Support.Wearable.Comapnion.WatchFaceCompanion won't import Android Studio

I am not using Eclipse. I am currently using Android Studio 1.0.2. I am attempting to complete the creating watch faces tutorial however I am not able to compile due to
import android.support.wearable.companion.WatchFaceCompanion; not importing.
I've searched here, and the other questions are for those using Eclipse. I've added all of the sdk build tools. This didn't work. I modified the gradle build items in wear/app and that didn't work.
Edit: I dug into the issue a bit more via the example and I noticed the import is referenced here:
G:[my_windows_username]\Android\WatchFace\Wearable\build\intermediates\exploded-aar\com.google.android.support\wearable\1.1.0\classes.jar!\android\support\wearable\companion\WatchFaceCompanion.class
Why isn't this in my new project by default when I attempt to import?
This is more than likely an issue where you have not added the line:
compile "com.google.android.support:wearable:1.1.+"
to your build.gradle for your APPLICATION module. This should fix your issue
I had the same problem with in my watch face application. I solved by installing/updating the Android Wear 2.0.1 version from SDK Manager in Android Studio.
I suggest, check out in build.grandle if there is an error on android.support.wearable.2.0.0 compilation. Then try to install newest SDK tools (wear 2.0.1) and lib (25.0.2)

How to import library which has gradle dependencies

I have been trying to use tooltip in android app
referring https://github.com/nhaarman/supertooltips.
But I cant make the project run since it requires gradle dependency.
As soon as I import the project and try to run it it shows error.
How to compile it so that I can use it in my project
OK. Since you are using eclipse, you need to install Gradle plugin. There is an old nice tutorial here.
Here's the official spring guide and source code to Gradle plugin.
But particularly, if you are using eclipse Luna, you might want to review this question.

Importing facebook sdk to android studio ruins my program

I have updated android studio to 0.5.9 and i downloaded the latest facebook SDK .
My problem is that whenever i try to import Facebook sdk from file ->import module->"facebook SDK path" the support v4 library magically disapears from extrernal libraries and i cant import anything from it(activityBar,fragments etc).So why is this happening?Am i missing something?
I was able to reproduce this while experimenting with test cases in response to this question and filed bug https://code.google.com/p/android/issues/detail?id=70825. We haven't found a root cause yet, but it seems only to happen if you're using Gradle 1.12.
Fortunately, there's a workaround, which is to switch to using Gradle 1.11 by setting the value in your gradle-wrapper.properties file:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip

How do I upgrade from cordova android 3.2 to 3.3 with eclipse?

Following the latest instructions from the docs I ran the update command with the cordova cli. I also updated eclipse and the android tools to API 19 as requested.
In the docs it says "IDE users will need to import the newly added MyProject-CordovaLib project into their workspace." However, when I go to eclipse and import the library, I don't know where it is. If I import the CordovaLib folder that is within the android folder, it comes up as "null-CordovaLib" And I still get build errors.
Can someone help me out here and provide me with the instructions to get this going?
I am also seeing similar behavior except the build error goes away when I import null-CordovaLib.
As a workaround, try recreating the project rather than upgrading it and then copy your html assets to the newly created project.
It might also help if you post the text of the error's you are seeing or the error log view.

Categories

Resources