firebase / geofire-java

GeoFire for Java - Realtime location queries with Firebase
MIT License
670 stars 271 forks source link

Update to Android SDK 12.0.1 #136

Closed samtstern closed 6 years ago

samtstern commented 6 years ago

Still struggling with Android though.

11.6.0 gives me this:

[ERROR] Failed to execute goal on project geofire-android: Could not resolve dependencies for project com.firebase:geofire-android:aar:2.3.1-SNAPSHOT: The following artifacts could not be resolved: com.google.firebase:firebase-common-license:jar:11.6.0, com.google.android.gms:play-services-tasks-license:jar:11.6.0, com.google.android.gms:play-services-basement-license:jar:11.6.0, com.google.firebase:firebase-database-license:jar:11.6.0, com.google.firebase:firebase-database-connection-license:jar:11.6.0: Could not find artifact com.google.firebase:firebase-common-license:jar:11.6.0 at specified path /usr/local/google/home/samstern/Projects/firebase/geofire-java/android/target/unpacked-libs/cgf_firebase-common-license_11.6.0/classes.jar -> [Help 1]

11.8.0:

[ERROR] Failed to execute goal on project geofire-android: Could not resolve dependencies for project com.firebase:geofire-android:aar:2.3.1-SNAPSHOT: The following artifacts could not be resolved: com.google.firebase:firebase-common-license:jar:11.8.0, com.google.android.gms:play-services-basement-license:jar:11.8.0, com.google.firebase:firebase-database-license:jar:11.8.0, com.google.firebase:firebase-database-connection-license:jar:11.8.0, com.google.android.gms:play-services-tasks-license:jar:11.8.0: Could not find artifact com.google.firebase:firebase-common-license:jar:11.8.0 at specified path /usr/local/google/home/samstern/Projects/firebase/geofire-java/android/target/unpacked-libs/cgf_firebase-common-license_11.8.0/classes.jar -> [Help 1]

12.0.1:

[ERROR] Failed to execute goal on project geofire-android: Could not resolve dependencies for project com.firebase:geofire-android:aar:2.3.1-SNAPSHOT: The following artifacts could not be resolved: com.android.support:support-compat:jar:26.1.0, android.arch.lifecycle:runtime:jar:1.0.0, com.android.support:support-media-compat:jar:26.1.0, com.android.support:support-core-utils:jar:26.1.0, com.android.support:support-core-ui:jar:26.1.0, com.android.support:support-fragment:jar:26.1.0: Failure to find com.android.support:support-compat:jar:26.1.0 in https://maven.google.com was cached in the local repository, resolution will not be reattempted until the update interval of google-maven has elapsed or updates are forced -> [Help 1]
samtstern commented 6 years ago

@vanniktech I don't see [5.0.9,), but 5.9.0 is latest.

samtstern commented 6 years ago

Ok I found the issue. The Android support library changed how they make the pom.xml files.

Here are the dependencies for support-v4 version 25.2.0:

  <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-compat</artifactId>
      <version>25.2.0</version>
      <type>aar</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-media-compat</artifactId>
      <version>25.2.0</version>
      <type>aar</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-core-utils</artifactId>
      <version>25.2.0</version>
      <type>aar</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-core-ui</artifactId>
      <version>25.2.0</version>
      <type>aar</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-fragment</artifactId>
      <version>25.2.0</version>
      <type>aar</type>
      <scope>compile</scope>
    </dependency>
  </dependencies>

And here are the dependencies for support-v4 version 26.1.0:

  <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-compat</artifactId>
      <version>26.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-media-compat</artifactId>
      <version>26.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-core-utils</artifactId>
      <version>26.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-core-ui</artifactId>
      <version>26.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-fragment</artifactId>
      <version>26.1.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

You can see they're no longer specifying <type>aar</type>. I will file a bug with the support lib people.

samtstern commented 6 years ago

Looks like the issue was fixed after 27.0.0: https://issuetracker.google.com/67576406

vanniktech commented 6 years ago

That link you sent out is only accessible to googlers.

samtstern commented 6 years ago

@vanniktech thanks! Replace with public link. Our internal proxy always redirects to the corporate version, leading to a lot of copy-paste blunders.

vanniktech commented 6 years ago

That works now, thanks.