I have such a ListView

<android.support.v4.widget.SwipeRefreshLayout android:id="@+id/main_refresh" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:showIn="@layout/activity_main"> <ListView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@color/colorGrey" android:dividerHeight="5dp" tools:listitem="@layout/item" /> </android.support.v4.widget.SwipeRefreshLayout> 

And there is a custom item

 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:id="@+id/imageView" android:layout_width="match_parent" android:layout_height="wrap_content" app:srcCompat="@mipmap/ic_image_black_24dp" android:contentDescription="@string/description" /> <TextView android:id="@+id/textView" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/app_name" /> <com.google.android.gms.plus.PlusOneButton xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" android:id="@+id/plus_one_button" android:layout_width="wrap_content" android:layout_height="wrap_content" plus:annotation="inline" plus:size="standard" /> </LinearLayout> 

I deduce the list of offers. I want every sentence to have a button of its own +1 but I don’t have anything to display when I add a button, everything is ok without a button!

 dependencies { ... compile 'com.google.android.gms:play-services:10.0.0' compile 'com.google.android.gms:play-services-auth:10.0.0' compile 'com.google.android.gms:play-services-plus:10.0.0' } 

In the preview item.xml gives this: enter image description here

I googled this problem and found a comment in which they wrote that this problem occurs if you use the com.google.android.gms: play-services library above version 7, well, I don’t think that google was throwing a non-working version into production and, as it were, 10 -I, I suspect they changed the api buttons or something like that, I integrated the button with this google documentation: https://developers.google.com/+/mobile/android/recommend maybe this old documentation is new ?

  • It is not clear at what point this error occurs. Add more subspecies to the question - Yuriy SPb
  • Here is an image of the error - sommelier
  • Those. Do you have a problem only in a previewer? If yes - just do not use it. He works very badly. You will have no problems on the device / emulator - YuriySPb
  • No, I have not only in the preview, I do not display a list with this button, without all the rules! - sommelier
  • In the information provided by you in the question there is nothing about the list. On the screen - a preview error. Until you provide more information you can not help. - YurySPb

0