Reputation: 27
I am creating an application to add the facebook like button, i'm using Facebook SDK version 3.19.1, and Android Studio 0.86, the problem is that in the layout not implement com.facebook.widget.LikeView. The error is The following classes could not be found: - com.facebook.widget.LikeView
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MyActivity">
<com.facebook.widget.LikeView
android:id="@+id/like"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Like"></com.facebook.widget.LikeView>
`
The library is add in my project, for add library, i used this guide Android Studio 0.8.1 - how to use Facebook SDK?
Upvotes: 1
Views: 865
Reputation: 332
Try to add xmlns:facebook="http://schemas.android.com/apk/res-auto"
to a RelativeLayout
Upvotes: 0
Reputation: 182
I think you have not properly added the facebook library :-
Right click your project ->Java build path -> Order and Export and make sure the facebook library is checked.
Also, make sure under Android dependencies > facebooksdk.jar, that you see com.facebook.widget.LoginButton.
If it's still not working, try deleting the facebook library, re-adding it, close and restart Eclipse.
Upvotes: 1