Back

Android SDK reference to setEndpoint is ambiguous

  • 0
  • Android
  • Self Hosted
Ibaraki Douji
27 Jul, 2024, 14:42

Hey, recently i wanted to setup a new android project and when setting up the appwrite endpoint i got this error :

TL;DR
Developers are experiencing an ambiguous reference error in the Android SDK for the `setEndpoint` function. A solution is being worked on in a pull request at <https://github.com/appwrite/sdk-generator/pull/881>. While waiting for the fix, developers can temporarily put the URL inside the constructor.
Ibaraki Douji
27 Jul, 2024, 14:43

Could it be because i have setup the Android as Java instead of Kotlin ?? (i'm used to java that's why)

Steven
27 Jul, 2024, 14:45

Are you using Appwrite cloud?

Ibaraki Douji
27 Jul, 2024, 14:45

no self hosted

Ibaraki Douji
27 Jul, 2024, 14:45

also here is the code directly

Ibaraki Douji
27 Jul, 2024, 14:45

and using my URL does the same (i just wanted to hide it for the screenshot)

Ibaraki Douji
27 Jul, 2024, 14:46

and the setProject is fine, no error on it

Steven
27 Jul, 2024, 14:48

Looks like there's a bug and it's being worked on in https://github.com/appwrite/sdk-generator/pull/881

Ibaraki Douji
27 Jul, 2024, 14:52

hmmm ok i will wait for this pull to be merged and see if it will fix the issue

Ibaraki Douji
27 Jul, 2024, 14:53

while waiting putting the URL inside the constructor works (but the pull will remove it in favor of the get/set)

Steven
27 Jul, 2024, 14:54

Ya I'm surprised this is possible because it isn't in our other SDKs and we want to keep them consistent

Ibaraki Douji
27 Jul, 2024, 14:54
Ibaraki Douji
27 Jul, 2024, 14:55

i'm supprised too since i already use the node and web which don't have this

Ibaraki Douji
27 Jul, 2024, 14:57

also looking at the error i do see two getter and setter for the endpoint in the file File from commit : https://github.com/appwrite/sdk-generator/blob/892fcf5a239f7379f3f8063000797ade95980d5e/templates/android/library/src/main/java/io/package/Client.kt.twig

line 48 to 52 and 182 - 190

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more