I am trying to add the following library:
https://github.com/infospace/android_oauth2_webview
to my project but I am getting an error:
Class is not a View android.support.v4.app.Fragment
(I also updated the v4 support libraries for the library and my project) Here's my main page on project:
<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"
tools:context=".MainActivity" >
<android.support.v4.app.Fragment
android:id="@+id/webview"
android:name="com.infospace.android.oauth2.AuthenticationFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
What am I doing wrong?
You need to use a
FragmentActivity
instead ofActivity
if you are includingFragment
s from the support library.