You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure how to put this, but I just spent the better part of the past few days hitting my head on the wall to figure this out (new to Kotlin), so maybe this will be beneficial to others, maybe it's an obscure bug, Idk.
Here's the signup sample code, verbatim, from the docs:
import com.etebase.client.*
import okhttp3.OkHttpClient;
val httpClient: OkHttpClient = Builder().build()
val user = User("username", "[email protected]")
// serverUrl can obtained from the dashboard (or null for default)
val client = Client.create(httpClient, serverUrl)
val etebase = Account.signup(client, user, "password")
However, there is a project that this is for which uses strict styleCheck asserts that fail if importing with asterisks. Thus, my import looks more like this:
This caused the User() method to fail, not knowing what to do with the abstract code that Flapigen generated (User.java):
E/i.[].debu: No implementation found for long com.etebase.client.User.init(java.lang.String, java.lang.String) (tried Java_com_etebase_client_User_init and Java_com_etebase_client_User_init__Ljava_lang_String_2Ljava_lang_String_2)
E/ACRA: ACRA caught a UnsatisfiedLinkError for []
java.lang.UnsatisfiedLinkError: No implementation found for long com.etebase.client.User.init(java.lang.String, java.lang.String) (tried Java_com_etebase_client_User_init and Java_com_etebase_client_User_init__Ljava_lang_String_2Ljava_lang_String_2)
This drove me absolutely nuts for a long time, even to the point of skipping class to try to knock it out. Several hours later, after so many reinstalls and searching the web without rest, I finally decided to try putting the User() call under the Client() call. It worked but then I got another error, which prompted me to try also putting toBase64() under Client(), and then I suddenly (finally) had my first successful account registration. Why this works, don't ask me. I assume maybe it's common sense to Kotlin experts, but I nearly gave up on the project when I hit this wall.
Also, this:
...
val httpClient: OkHttpClient = Builder().build()
...
Gets some complaints because there are apparently hundreds of Builder() classes. Meaning, you have to do one of two things:
Not sure how to put this, but I just spent the better part of the past few days hitting my head on the wall to figure this out (new to Kotlin), so maybe this will be beneficial to others, maybe it's an obscure bug, Idk.
Here's the signup sample code, verbatim, from the docs:
However, there is a project that this is for which uses strict styleCheck asserts that fail if importing with asterisks. Thus, my import looks more like this:
This caused the
User()
method to fail, not knowing what to do with the abstract code that Flapigen generated (User.java
):This drove me absolutely nuts for a long time, even to the point of skipping class to try to knock it out. Several hours later, after so many reinstalls and searching the web without rest, I finally decided to try putting the
User()
call under theClient()
call. It worked but then I got another error, which prompted me to try also puttingtoBase64()
underClient()
, and then I suddenly (finally) had my first successful account registration. Why this works, don't ask me. I assume maybe it's common sense to Kotlin experts, but I nearly gave up on the project when I hit this wall.Also, this:
Gets some complaints because there are apparently hundreds of
Builder()
classes. Meaning, you have to do one of two things:... or:
... which looks a bit tacky and many stylists would complain about in an official repo.
Anyway, I was just laying down this information because I was asked to, and maybe someone will find it useful.
The text was updated successfully, but these errors were encountered: