2016-06-09 2 views
1

Ich weiß, das sehr seltsam ist, aber wahrscheinlich seitdem ich dann Google Play-Dienste aktualisiert, wenn ich versuche, ein Bild aus der Galerie immer Absichten wie folgt aus:Android bekommen Bild aus der Galerie friert App nach Google Play-Dienste zu aktualisieren

Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); 
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST); 

meine App friert für immer ein und ich bekomme einen schwarzen Bildschirm, ob ich ein Bild wähle oder die Absichtsoperation abbringe, und um sicher zu sein, dass ich meine Gradle-Datei zurückgebracht habe und dann alles gut geklappt hat!

meine alte gradle Datei

apply plugin: 'android' 
apply plugin: 'com.google.gms.google-services' 
apply plugin: 'io.fabric' 
android { 

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' 
} 
compileSdkVersion 21 
buildToolsVersion "21.1.2" 
defaultConfig { 
    applicationId "com.example.myapp" 
    minSdkVersion 14 
    targetSdkVersion 23 
    versionCode 8 
    versionName "3.0.0" 
    multiDexEnabled true 

} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    debug { 
     buildConfigField "boolean", "USE_CRASHLYTICS", "false" 
     ext.enableCrashlytics = false 
    } 

} 
lintOptions { 

    checkReleaseBuilds false 
    //abortOnError false 

} 
productFlavors { 
} 
} 

dependencies { 
compile project(':viewPagerIndicatorLibrary') 
compile files('libs/universal-image-loader-1.9.1-with-sources.jar') 
compile files('libs/httpclient-4.3.2.jar') 
compile files('libs/httpclient-cache-4.3.2.jar') 
compile files('libs/httpcore-4.3.1.jar') 
compile files('libs/httpmime-4.3.2.jar') 
compile files('libs/gcm.jar') 
compile files('libs/jsoup-1.7.3.jar') 
compile files('libs/PdfViewer.jar') 
compile 'com.android.support:support-v4:21.0.3' 
compile 'com.android.support:appcompat-v7:21.0.3' 
compile 'com.android.support:percent:+' 
// compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3' 
// compile "com.squareup.retrofit2:converter-gson:2.0.0-beta3" 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'com.google.code.gson:gson:2.3.1' 
compile 'com.google.android.gms:play-services:8.3.0' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.google.guava:guava-collections:r03' 
testCompile 'junit:junit:4.12' 
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
    transitive = true; 
} 
compile 'com.github.bumptech.glide:glide:3.7.0' 
compile 'com.koushikdutta.ion:ion:2.+' 
} 

nach meiner gradle Datei aktualisieren

apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 
android { 

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' 
} 
compileSdkVersion 23 
buildToolsVersion "23.0.3" 
defaultConfig { 
    applicationId "com.example.myapp" 
    minSdkVersion 14 
    targetSdkVersion 23 
    versionCode 8 
    versionName "3.0.0" 
    multiDexEnabled true 

} 
dexOptions { 
    javaMaxHeapSize "4g" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    debug { 
     buildConfigField "boolean", "USE_CRASHLYTICS", "false" 
     ext.enableCrashlytics = false 
    } 

} 
lintOptions { 

    checkReleaseBuilds false 
    //abortOnError false 

} 
productFlavors { 
} 
} 

dependencies { 
compile project(':viewPagerIndicatorLibrary') 
compile files('libs/universal-image-loader-1.9.1-with-sources.jar') 
compile files('libs/httpclient-4.3.2.jar') 
compile files('libs/httpclient-cache-4.3.2.jar') 
compile files('libs/httpcore-4.3.1.jar') 
compile files('libs/httpmime-4.3.2.jar') 
compile files('libs/gcm.jar') 
compile files('libs/jsoup-1.7.3.jar') 
compile files('libs/PdfViewer.jar') 
compile 'com.android.support:support-v4:23.4.0' 
compile 'com.android.support:appcompat-v7:23.4.0' 
compile 'com.android.support:percent:+' 
// compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3' 
// compile "com.squareup.retrofit2:converter-gson:2.0.0-beta3" 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'com.google.code.gson:gson:2.4' 
compile 'com.google.android.gms:play-services:9.0.2' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.google.guava:guava-collections:r03' 
testCompile 'junit:junit:4.12' 
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
    transitive = true; 
} 
compile 'com.github.bumptech.glide:glide:3.7.0' 
compile 'com.koushikdutta.ion:ion:2.+' 
} 
apply plugin: 'com.google.gms.google-services' 

wie für die gradle Projektdatei, i geändert nur dieses

dependencies { 
    classpath 'com.android.tools.build:gradle:2.0.0' 
    classpath 'com.google.gms:google-services:1.5.0-beta2' 
    classpath 'io.fabric.tools:gradle:1.+' 
    } 

dazu:

dependencies { 
    classpath 'com.android.tools.build:gradle:2.1.2' 
    classpath 'com.google.gms:google-services:3.+' 
    classpath 'io.fabric.tools:gradle:1.+' 
} 

ich weiß, anscheinend sieht das so aus, als hätte es nichts mit der Galeriebegabung zu tun, sondern das, was tatsächlich passiert.

auch gibt es nichts Bemerkenswertes im Logcat, um das Problem zu definieren, die App friert einfach ein!

Antwort

0

Ich habe nur die Bibliotheken i aus dem Play-Service wie diese benötigen verwendet:

compile 'com.google.android.gms:play-services-gcm:9.0.2' 
compile 'com.google.android.gms:play-services-maps:9.0.2' 

das ist mein Problem gelöst, aber immer noch diese Frage muss Erklärung und Untersuchung von Google.

0

Ich habe das gleiche Problem, ich auf 9.2.0 aktualisiert und jetzt funktioniert es, aber es ist ein seltsames Problem

Verwandte Themen