Android sdk error

Are you looking for help?

This is a support forum for reporting issues related to Backendless services. Please note that due to our support policy we cannot provide you help with debugging your code, consulting in regards to any language or third-party library usage. For this kind of questions we recommend using more appropriate forums like Stack Overflow.

In order to suggest you a quality solution, we shall usually ask you to provide the details mentioned below first. Including them into your topic right away helps us to start investigating your issue much faster.

In case you have a suggestion or an idea, the details below are not always required, though still any additional background is welcome.

Backendless Version (3.x / 6.x, Online / Managed / Pro )

6.402

Client SDK (REST / Android / Objective-C / Swift / JS )

android

Application ID

C05857AC-EB46-E0EE-FF3B-DDB752688C00

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

when i use sdk in android app always return me
Content type ‘application/x-amf’ is not allowed for upload files. Use ‘multipart/form-data’ or ‘application/json’
when i request data from database or realtime database

Actual Behavior

Please provide a description of what actually happens, working from the same starting point.

Be descriptive: “it doesn’t work” does not describe what the behavior actually is – instead, say “the request returns a 400 error with message XXX”. Copy and paste your logs, and include any URLs.

Error 6017
Content type ‘application/x-amf’ is not allowed for upload files. Use ‘multipart/form-data’ or ‘application/json’

Reproducible Test Case

Please provide a simple code that could be run in a new clean app and reproduce the issue.

If the issue is more complex or requires configuration, please provide a link to a project on Github that reproduces the issue.

Could you please remove the placeholders from you message ?

Do I understand correctly what the point is?

Error 6017
Content type ‘application/x-amf’ is not allowed for upload files. Use ‘multipart/form-data’ or ‘application/json’

Please, add the simple code snippet which we can use to reproduce the error.

hi
i added backendless to my gradle
then add this two line in my application class

     Backendless.initApp(this,"","");
Backendless.setUrl("https://hiproute.backendless.app");

and for get data

    Thread(Runnable {

            var a = Backendless.Data.of("Person");
            Log.w("www", "onCreate: " + a.findFirst().size )
        }).start()

when i build and run in my phone logcat return me this error

  Process: com.segas.allinonevideodownloader, PID: 31594
    BackendlessException{ code: 'See details for error code', message: 'Server reported an error. See fault details for additional information', extendedData: '{}', detail: '{"code":6017,"message":"Content type 'application/x-amf' is not allowed for upload files. Use 'multipart/form-data' or 'application/json'.","errorData":{}}' }
        at com.backendless.Invoker$SyncResponder.errorHandler(Invoker.java:124)
        at com.backendless.persistence.MapDrivenDataStore$MapDrivenResponder.errorHandler(MapDrivenDataStore.java:981)
        at weborb.client.ioEngine.HttpIOEngine.deliverErrorToResponder(HttpIOEngine.java:243)
        at weborb.client.ioEngine.HttpIOEngine.processNonAMFErrorResponse(HttpIOEngine.java:233)
        at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:203)
        at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:140)
        at weborb.client.WeborbClient.invoke(WeborbClient.java:138)
        at com.backendless.Invoker.invokeSync(Invoker.java:95)
        at com.backendless.persistence.MapDrivenDataStore.findFirst(MapDrivenDataStore.java:231)
        at com.backendless.persistence.MapDrivenDataStore.findFirst(MapDrivenDataStore.java:51)
        at com.segas.allinonevideodownloader.MainActivity$onCreate$1.run(MainActivity.kt:89)
        at java.lang.Thread.run(Thread.java:919)

Please make sure to follow the instructions from the documentation:
Client-side Setup - Backendless SDK for Android/Java API Documentation