2016-07-12 157 views
0

我的Android應用程序完美地運行到棒棒糖。但它掛在棉花糖上。Apps掛在棉花糖

當我打開應用程序,回到主頁按鈕,再次打開應用程序。它掛起。我用所有這些庫:

compile 'com.android.support:appcompat-v7:23.2.1' 
compile 'com.android.support:design:23.2.1' 
compile 'com.android.support:support-v4:23.2.1' 
compile 'com.android.support:recyclerview-v7:23.2.1' 
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' 
compile 'com.mcxiaoke.volley:library:1.0.+' 
compile 'com.google.android.gms:play-services-analytics:9.0.2' 
compile "com.google.android.gms:play-services:9.0.2" 
compile 'com.google.firebase:firebase-messaging:9.0.2' 
compile 'com.android.support:multidex:1.0.0' 

我用:

compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.example.appid" 
     minSdkVersion 15 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 

    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    dexOptions { 
     dexOptions { 
      incremental true 
      javaMaxHeapSize "4g" 
     } 
    } 
+0

如果您還沒有實現RuntimePermission,請設置targetSdkVersion 22 – HenryChuang

回答

0

我已經找到了解決辦法。 我剛剛更新了庫,以最新的庫,即 compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' compile 'com.android.support:support-v4:23.2.1' compile 'com.android.support:recyclerview-v7:23.2.1' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' compile 'com.mcxiaoke.volley:library:1.0.1' compile 'com.google.android.gms:play-services-analytics:9.2.0' compile "com.google.android.gms:play-services:9.2.0" compile 'com.google.firebase:firebase-messaging:9.0.2' compile 'com.android.support:multidex:1.0.1'

因爲我沒有使用危險的權限,我不需要在運行時處理。