PlusOneButton does not render in design view but works fine in real device

55 Views Asked by At

This is the XML tag used.

<com.google.android.gms.plus.PlusOneButton
        android:id="@+id/plus_one_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_below="@id/recommendGooglePlus"
        android:layout_marginStart="16dp"
        plus:annotation="inline"
        plus:size="standard" />

Project compiles and renders in device without any issues. But in design view in Android Studio it displays com.google.android.gms.plus.PlusOneButton could not be instantiated with NPE. Rendering Problems IDE configuration is as mentioned below:

  1. Android Studio 2.1.2
  2. Google Play Services Rev 31
  3. compileSdkVersion 24
  4. buildToolsVersion "24.0.0"

What I have tried already:

  • Clean / rebuild
  • Invalidate caches / Restart AS 2.1.2 Updated SDK's

Is this even possible or should I stick to the simple solution of change PlusOneButton to FrameLayout to check in design view and change it back to PlusOneButton while in text view.

0

There are 0 best solutions below