【发布时间】:2016-06-04 02:26:08
【问题描述】:
我想将 Firebase 集成到我的 Android 应用程序中。当我这样做时,我需要将 com.google.gms.google-services 版本 9 添加到我的应用程序 gradle 中。
在测试了几次并打开我的应用几次后,有时我的应用在启动后没有响应(甚至还没有创建视图)。
因此,我尝试将 com.google.gms.google-services 恢复到 7.5 版,这是我在添加 Firebase 之前使用的版本。然后,我的应用程序就像以前一样正常工作。
这是我的应用程序的 gradle 模块文件(恢复到 gms 版本 7.5 后)
apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'
android {
// compileSdkVersion 23
// buildToolsVersion '23.0.0'
compileSdkVersion 22
buildToolsVersion '22.0.0'
defaultConfig {
applicationId "com.pasarumah.androidapp"
minSdkVersion 15
targetSdkVersion 22
versionCode 7
versionName "1.6"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.mcxiaoke.volley:library:1.0.7'
compile 'org.apache.httpcomponents:httpmime:4.3.5'
// compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile files('libs/httpcore-4.3.3.jar')
// compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.android.support:multidex:1.0.1'
compile files('libs/universal-image-loader-1.9.4.jar')
}
我已经搜索过,似乎有人和我有同样的问题: Android app not responding
【问题讨论】:
-
你还在遇到这个问题吗?