codelab-maps-platform-101-android-kotlin icon indicating copy to clipboard operation
codelab-maps-platform-101-android-kotlin copied to clipboard

Cannot get markerCollection.setInfoWindowAdapter to compile

Open alan-leslie opened this issue 4 years ago • 8 comments

I cannot, for the life of me, get the line: clusterManager.markerCollection.setInfoWindowAdapter(MarkerInfoWindowAdapter(this)) to compile.

However if I comment it out and leave the setInfoWindowAdapter in the OnCreate: googleMap.setInfoWindowAdapter(MarkerInfoWindowAdapter(this)) things look to me to work

alan-leslie avatar Jun 30 '21 14:06 alan-leslie

What error are you seeing? Also, what versions of the libraries are you using?

arriolac avatar Jul 07 '21 20:07 arriolac

Hi

I've looked at this again and I see that it does build and run. I don't understand why though because AndroidStudio flags up errors in the MainActivity.kt (see attached screenshot).

The version of AndroidStudio that I am using is 4.2.2. The build.gradle files are unchanged from the code in the zip file apart from the platform build.gradle has: classpath 'com.android.tools.build:gradle:4.2.2'

Do you want me to add that information to the original report?

Alan

On Wed, 7 Jul 2021 at 21:06, Chris Arriola @.***> wrote:

What error are you seeing? Also, what versions of the libraries are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googlecodelabs/maps-platform-101-android/issues/9#issuecomment-875895383, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHBRNKTE7ZZ46OTSLNWKOTTWSXSPANCNFSM47SQD2WA .

alan-leslie avatar Jul 08 '21 09:07 alan-leslie

@alan-leslie I don't see the screenshot you mentioned. Can you try attaching again?

arriolac avatar Jul 08 '21 15:07 arriolac

[image: cluster_map_error.png]

Hopefully that will be clear enough. If not let me know and I'll copy in the error message.

On Thu, 8 Jul 2021 at 16:29, Chris Arriola @.***> wrote:

@alan-leslie https://github.com/alan-leslie I don't see the screenshot you mentioned. Can you try attaching again?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/googlecodelabs/maps-platform-101-android/issues/9#issuecomment-876535471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHBRNOXDZ3BUYI242ETKRLTWW75VANCNFSM47SQD2WA .

alan-leslie avatar Jul 08 '21 16:07 alan-leslie

The image is still not attached perhaps because you're attaching it from your mail client? Either try commenting directly on this thread through GitHub or copy/paste the error message here.

arriolac avatar Jul 08 '21 17:07 arriolac

cluster_map_error

For each line in MainActivity.kt that begins with: clusterManager.markerCollection.

I get the erroe message:

Internal Error occurred while analyzing this expression: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

Something similar also comes up if I mouse over the line.

alan-leslie avatar Jul 08 '21 20:07 alan-leslie

What version of Android Studio are you using?

arriolac avatar Jul 08 '21 20:07 arriolac

The version of AndroidStudio that I am using is 4.2.2.

alan-leslie avatar Jul 08 '21 21:07 alan-leslie