2017-09-19 1 views
0

Ich habe dies in einer Funktion:Nach dem Update-Tools 26.0.2 bauen Ich kann nicht Bounds mehr verwenden

Location locFirstLocation = lastLocations.get(0); 
LatLngBounds bounds = Utils.boundsForLocations(lastLocations); 
LatLng middle = bounds.getCenter(); 

Utils.boundsForLocations wie folgt aussieht:

public static LatLngBounds boundsForLocations(ArrayList<Location> locations) { 
    if (locations == null || locations.size() == 0) { 
     return null; 
    } 
    Integer counter = 0; 
    LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder(); 
    LatLngBounds bounds; 
    for (Location loc : locations) { 
     if (loc != null) { 
      counter++; 
      boundsBuilder.include(new LatLng(loc.getLatitude(), loc.getLongitude())); 
     } 
    } 
    if (counter > 0) { 
     bounds = boundsBuilder.build(); 
     return bounds; 
    } else { 
     return null; 
    } 
} 

ich dieses Problem bekommen:

Error:(1545, 39) error: cannot access zza 
class file for com.google.android.gms.common.internal.safeparcel.zza not found 

Ich vermute, etwas wurde von diesem Paket veraltet? Muss ich Grenzen anders verwenden?

EDIT: Gradle Datei:

buildscript { 
repositories { 
    maven { url 'https://maven.fabric.io/public' } 
    maven { url 'http://dl.bintray.com/amulyakhare/maven' } 
    maven { url 'https://jcenter.bintray.com/' } 
    maven { url "https://jitpack.io" } 
} 

dependencies { 
    classpath 'io.fabric.tools:gradle:1.+' 
    classpath "io.realm:realm-gradle-plugin:3.2.0" 
    classpath 'com.google.gms:google-services:3.1.0' // google-services plugin 
} 
} 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 
apply plugin: 'realm-android' 

repositories { 
maven { url 'https://maven.fabric.io/public' } 
maven { url 'http://dl.bintray.com/amulyakhare/maven' } 
maven { url 'https://jcenter.bintray.com/' } 
maven { url "https://jitpack.io" } 
maven { 
    url 'https://maven.google.com' 
} 
} 


android { 
compileSdkVersion 26 
buildToolsVersion '26.0.1' 
defaultConfig { 
    applicationId "nl.hgrams.passenger" 
    minSdkVersion 17 
    targetSdkVersion 23 
    versionCode 905 
    versionName '2.9' 
    multiDexEnabled true 
} 
lintOptions { 
    checkReleaseBuilds false 
    abortOnError false 
} 
dexOptions { 
    preDexLibraries = false 
    javaMaxHeapSize "4g" 
} 
packagingOptions { 
    exclude 'META-INF/services/javax.annotation.processing.Processor' 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/NOTICE' 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     shrinkResources false 
     ext.enableCrashlytics = true 
     ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt" 
     ext.betaDistributionEmails = "[email protected], [email protected], [email protected]" 
     ext.betaDistributionGroupAliases = "passenger-android-beta" 

    } 

    debug { 
     minifyEnabled false 
     shrinkResources false 
     ext.enableCrashlytics = true 
     ext.betaDistributionEmails = "[email protected], [email protected], [email protected]" 
     ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt" 
     ext.betaDistributionGroupAliases = "passenger-android-beta" 

    } 
} 
} 

dependencies { 
compile 'com.android.support:multidex:1.0.0' 
compile fileTree(dir: 'libs', include: ['*.jar']) 
compile 'com.android.support:appcompat-v7:26.0.2' 
compile 'com.android.support:design:26.0.2' 
compile 'com.google.code.gson:gson:2+' 
compile 'com.android.volley:volley:1+' 
compile 'com.jakewharton:butterknife:4.0.+' 
compile 'com.squareup.okhttp:okhttp:2.0.0+' 
compile 'com.google.android.gms:play-services-maps:10.2.0' 
compile 'com.google.android.gms:play-services-location:10.2.0' 
compile 'com.google.android.gms:play-services-gcm:10.2.0' 
compile 'com.google.android.gms:play-services-analytics:10.2.0' 
compile 'com.google.android.gms:play-services-auth:10.2.0' 
compile 'com.tonicartos:stickygridheaders:[email protected]' 
compile files('libs/nineoldandroids-2.4.0.jar') 
compile files('libs/okhttp-urlconnection-2.0.0.jar') 
compile project(':libraries:facebook') 
compile 'com.edmodo:cropper:1.0.1' 
compile 'com.squareup.picasso:picasso:2.3.3' 
compile 'com.makeramen:roundedimageview:1.3.0' 
compile 'com.google.maps.android:android-maps-utils:0.3+' 
compile 'com.instabug.library:instabug:2+' 
compile 'io.reactivex:rxjava:1.1.0' 
compile 'com.plattysoft.leonids:LeonidsLib:1.3.1' 
compile 'io.smooch:core:latest.release' 
compile 'io.smooch:ui:latest.release' 
compile 'com.android.support:percent:26.0.2' 
compile 'com.android.support:recyclerview-v7:26.0.2' 
compile "com.daimajia.swipelayout:library:[email protected]" 
compile 'com.squareup.okhttp3:okhttp:3.2.0' 
compile 'com.squareup.retrofit:retrofit:1.9.0' 
compile 'com.bartoszlipinski:recyclerviewheader2:2.0.1' 
compile 'io.branch.sdk.android:library:1.+' 
compile 'com.github.2359media:EasyAndroidAnimations:0.8' 
compile 'me.grantland:autofittextview:0.2.+' 
compile 'com.github.kaknazaveshtakipishi:PermissionEverywhere:1.0.2' 
compile 'com.google.firebase:firebase-core:11.2.2' 
compile 'com.google.firebase:firebase-storage:11.2.2' 
compile 'com.google.firebase:firebase-auth:11.2.2' 
compile 'com.google.firebase:firebase-messaging:11.2.2' 
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
    transitive = true; 
} 
compile(
     [group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.1'], 
     [group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.1'], 
     [group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.1'] 
) 

compile 'devlight.io:navigationtabbar:1.2.5' 
compile 'org.apache.commons:commons-lang3:3.4' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.android.support:transition:26.0.2' 
compile 'me.grantland:autofittextview:0.2.+' 



} 

apply plugin: 'com.google.gms.google-services' 
+0

Bitte posten Sie Ihre App build.gradle Datei. – Hetfieldan24

+0

@ Hetfieldan24 getan –

Antwort

0

ich es fest durch die Play-Dienste von 10.2.0 bis 11.2.2 (gleich wie Feuerbasis) bauen zu ändern:

compile 'com.google.android.gms:play-services-maps:11.2.2' 
compile 'com.google.android.gms:play-services-location:11.2.2' 
compile 'com.google.android.gms:play-services-gcm:11.2.2' 
compile 'com.google.android.gms:play-services-analytics:11.2.2' 
compile 'com.google.android.gms:play-services-auth:11.2.2' 
Verwandte Themen