I'm trying to add the facebook SDK to my project but it won't work at all.
I've followed the official steps; opened the fb sdk, made sure it's set to "is library", in m yown project go to properties->android->add library and it lets me select com_facebook_android and it shows up with a green tick next to it. HOWEVER, when i go back to that screen straight away it now has a red cross next to it, and if i try to launch the app in the emulator it has " com_facebook_android] Could not find com_facebook_android.apk!"
(This is just me testing without referencing the library in my app)
if i DO reference the library, then any calls to the facebook library give an error within eclipse and the tooltip suggests to add it to build path, so if i click that it launches fine, but still does the above apk error and the app force closes on any activity which references facebook.
As far as I can tell I'm following the official instructions fine but it just keeps coming back to that red cross in my app's properties
Does anyone know what this could be?
Not sure why you have the issue, i've setup a empty project with facebook library in it, if you have no luck then try downloading that, unzipping it and importing exsiting project into workspace.
link : Download here
you know what i have done one trick to use the official facebook SDK in my application, i have created com.facebook.android and add all the library classes into it. Then i can easily reach to access any class whenever i want it. This can be a way to use the classes inside your application instead of using Library.
Its running fine in my case.
Related
I think this is probably a basic question, but I just could not find the button. I was trying to create a new Android project from the starting page. But when I click on New Project it gives me a page with the options of Java, Maven, Gradle, Groovy Griffin... instead of the familiar starting page with Blank App, Google Map, etc.
When I opened a previous project, it opens Tags like C:, Users, Android, etc. The image is below:
Any idea how do I find that page back?
You may need to update the SDK first, by SDK Manager.
Don't know what happened, but I closed Android Studio for one day. When I opened it the second day, it got back normal. (I also closed all project when closing the Studio.)
I have already created an phonegap android project and it is working fine, now i would like to create same kind of project againg. Might it would be more than 5 apps, so i thought making it as library.
I have make the project as library and created a new project with different package name. Change the launcher activities name to the libraries launcher activity name. But now the issue is application error is happening, cannot load the index.html file.
So i think the way worked on is not the proper one, can anyone please help me to solve this problem.
you have to assign your initial android project as a library. right click the project, pick properties, then go to android, tick the "is library" box and apply
For your new projects, you need to "add" the project before as your library as the image above
When I use the command 'Quick Documentation' in Android Studio in a class that comes from one of the support libraries (e.g. ActionBarActivity), the IDE does not show the documentation for the class. If I use it on one of the classes from, say, the Android API 19 (e.g. Activity), the IDE displays the complete documentation as is shown in the reference page on https://developer.android.com/reference/packages.html.
Is there any way to add the documentation for the support libraries to Android Studio so that they can be accessed through 'Quick Documentation' as well?
When Android Studio has opened the decompiled jar class, click on "Download..." blue link at top right, this will download jar with javadoc and save it in :
/.ideaLibSources
rebuild project if necessary, now doc is available.
Tested on android studio 2.0 preview 4.
If you are not using Gradle, this will be easier for you.
Go to File -> Project Structure. From there, on the left-hand side, select Libraries. Select the library you want to add source/java-docs to, then click the plus at the bottom and add the source and/or java-doc jars. There's a chance AS will automatically know what's what.
If you're using Gradle, more than likely in Project Structure, you won't see the Libraries tab, and I'm sorry but I don't know how to help from that point. If you use Gradle, AS detects that and takes away "unnecessary" options. Sorry to send you searching again, but I know there's something called a .properties file for jars that tell the source and java-docs, but I haven't implemented it. If I can find the page that told me that information, I'll update this.
EDIT: The answer is here. This should help you out.
I'm having a real bad time trying to get Licensing to work. I'm following the docs at this location. I built the LVL library from the existing code in the Google Play Licensing Library and put the library into my workspace along with my android project.
I'm using code from this example that packages the licensing logic into a separate activity but I believe this is moot to the problem I'm having as I have tried it from my own main activity too.
THE PROBLEM IS: I cannot import com.android.vending.licensing...
The graphic below illustrates the problem. Internet research on this issue turns up many developers having this and related problems but none of the solutions work for me.
Does anyone have a clue?
Right click on LVLibrary -> Properties -> Android
Check if isLibrary is selected (checked)
THen go into your com.deanblake... and right click on that, then same as above but where you see reference check if the libarary is added (doesnt have an x next to it). If not just click Add and select LVLibrary.
I have been trying to use FBConnect in my app but whenever I try to reference the SDK, it doesn't quite do it.
This is the screenshot
Please help. I am stuck for past 4 hours. Nothing found on google or here on SO
Refer to this page: http://www.mobisoftinfotech.com/blog/android/845/. Seems like you should add the JAR file. What you did here is add a library - an open project in Eclipse that serves as a library for another project.
Clarification: when you click add, you see "FacebookSDK". It shows as valid until you close the properties dialog. Then when you open the dialog again, it has a red X next to it.
If that is what is happening to you... I ran into the same thing a long time ago. The facebook sdk needs to be in the same parent folder as your project.
For example, if you are running out of c:\users\me\workspace\my cool project,
the facebook sdk needs to be in c:\users\me\workspace\facebook-android-skd-2.0.2.b
No idea why, but after beating my head against the wall over this for a couple of days I figured it out.