我最近添加了Google Analytics 9.0.0。在这样做的同时,我还必须添加multidex和
dexOptions {
javaMaxHeapSize "4g"
}
避免错误。该应用似乎工作正常,但意识到,当我暂停或最小化应用程序并再次恢复它,然后应用程序doenot响应。屏幕显示为黑色几分钟,然后显示"应用程序未响应"信息。我该怎么办?
这是我的gradle文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "xx.xxxxxxxx.xx"
minSdkVersion 16
targetSdkVersion 23
versionCode 4
versionName "1.0.3"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':volley')
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'com.android.support:design:23.1.1'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.lorentzos.swipecards:library:1.0.9@aar'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-identity:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.wang.avi:library:1.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'me.alexrs:wave-drawable:1.0.0@aar'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'org.apache.httpcomponents:httpmime:4.5'
compile 'com.github.aakira:expandable-layout:1.5.1@aar'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}