【问题标题】:Search Stop working after Updating to com.google.android.gms:play-services:11.0.4更新到 com.google.android.gms:play-services:11.0.4 后停止工作
【发布时间】:2018-02-19 00:25:34
【问题描述】:

我想添加 firebase,因此我将源代码从 com.google.android.gms:play-services:7.3.0 更新为 11.0.4

但在我解决了所有问题后,我发现单击按钮时搜索栏不起作用

我的应用程序 Gradle:

dependencies
        {
            compile 'com.google.firebase:firebase-core:11.0.4'
            compile 'com.facebook.android:facebook-android-sdk:4.15.0'
            compile 'com.android.support:support-v4:21.0.3'
            compile 'com.android.support:appcompat-v7:23.0.1'
            compile 'com.android.support:cardview-v7:21.0.3'
            compile 'com.android.support:recyclerview-v7:21.0.3'
            compile 'com.google.android.gms:play-services:11.0.4'
            compile 'com.afollestad:material-dialogs:0.6.3.4@aar'
            compile 'com.bignerdranch.android:recyclerview-multiselect:0.1'
            compile 'com.j256.ormlite:ormlite-android:4.48'
            compile 'com.melnykov:floatingactionbutton:1.3.0'
            compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
            compile 'se.emilsjolander:StickyScrollViewItems:1.1.0'
            compile fileTree(include: ['*.jar'], dir: 'libs')

        }


android
        {
            compileSdkVersion 25
            buildToolsVersion "25.0.2"
            defaultConfig
                    {
                        minSdkVersion 21
                        targetSdkVersion 22
                        versionName "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
                        versionCode 2
                    }

我的搜索 XML 文件:

<?xml version="1.0" encoding="utf-8"?>
<searchable
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/global_spacing_l"
    android:paddingLeft="@dimen/global_keyline_s"
    android:paddingRight="@dimen/global_keyline_s"
    android:orientation="vertical"
    android:gravity="center_vertical">

    <TextView
        android:id="@+id/search_suggestion_item_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:maxLines="1"
        android:textAppearance="@style/TextAppearance.Cookbook.Display1" />

</searchable >

提前谢谢你

【问题讨论】:

  • 错误是什么?它会崩溃吗?还是怎么做?
  • 不,我没有收到任何错误,它运行良好,只是搜索按钮在更新为 ( compile 'com.google.android.gms:play-services:11.0.4 ')

标签: javascript android android-studio


【解决方案1】:

你在 gradle 中有一个插件 "plugin: 'com.google.gms.google-services'"

//end gradle
}
apply plugin: 'com.google.gms.google-services'

【讨论】:

  • 是的,我已经编译了 'com.google.android.gms:play-services:11.0.4'
猜你喜欢
  • 2014-10-01
  • 2014-10-01
  • 1970-01-01
  • 2016-11-03
  • 1970-01-01
  • 1970-01-01
  • 2013-08-29
  • 1970-01-01
  • 2022-11-06
相关资源
最近更新 更多