This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote


I am trying to create a new Android plugin that will use the play-services-nearby API.
I am working with the exe and export templates I found here:

When adding a simple class it works well. Then I just add the dependency to nearby api, by adding to gradle.conf:

implementation ''

I got then this error:

Looks like an incompatibility with the nearby api, using androidx.

So I tested several solutions, but none of them seems to works. (I'll explain below)
Does anyone have an idea how can I fix it ?

Downgrade play-services-nearby

Looking on the internet, it seems that we can downgrade the api version to have it compatible with non x android.

So I used 'play-services-nearby:16.0.0'.
Then the following error pop:

I then changed the gradle.conf to:

implementation ''
implementation ''

This make gradle pass, however godot then completely crashes with the error:

ERROR: get: FATAL: Index p_index=-1 out of size (size()=62)
   At: ./core/cowdata.h:151


As suggested in the logs, I tried to use in the manifest:


But new error occur, and it seems that some libs are duplicated.

Use android X

I tried to migrate the build to androidx, by adding to


Then needed some changes to migrate (looking at => => androidx.core.content.ContextCompat => androidx.annotation.Keep

The gradle build works, but then godot crashes with the same error:

ERROR: get: FATAL: Index p_index=-1 out of size (size()=62)
   At: ./core/cowdata.h:151

So I am a little bit stuck and looking for ideas.
Also, if someone knows how to copy/paste the output of the gradle build in godot (or find the log file), it will help instead of pasting images :)

If needed, I can provide the code example I am using.

Does anyone have any idea on how to use it ? Or already implement nearby plugin ?

Thanks a lot !

in Engine by (13 points)

i have same error lol

1 Answer

0 votes

I was experiencing similar problems using a play services plugin with other plugins like Admob, Share and Vibration for Godot 3.2 after many modifications I managed to get everyone to work by migrating some codes to androidx. I don't know if it helps you but I can tell you what worked in my case.

The plugin I used is this:

by (25 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.