ta264 1 Posted October 24, 2016 Share Posted October 24, 2016 I was playing around at the weekend looking to get into emby development. I spotted an odd looking error in my logs and thought I'd take a look as a 'mini-project' to get me started. After investigating for a bit I guessed that the API call here: https://github.com/MediaBrowser/Emby.ApiClient.Java/blob/518ac44499eb91a7bef599e7bc7c0367debcf140/src/main/java/mediabrowser/apiinteraction/connectionmanager/ValidateAuthenticationResponse.java#L42 is not quite right: I think the address should be /emby and not /mediabrowser. I wanted to try changing the request, compiling the api and then recompiling the android app with the fixed api to see if the error goes away. However I can't get the API to build. I did the following: > git clone git@github.com:MediaBrowser/Emby.ApiClient.Java.git > cd Emby.ApiClient.Java > gradle jar This fails with the error: :emby.apiclient.android:compileJava/home/tom/git_working/Emby.ApiClient.Java/android/src/main/java/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java:3: error: package android.os does not exist import android.os.Build; I can fix this by copying android.jar from the SDK into the android/libs directory but then I get a new error: :emby.apiclient.android:compileJava/home/tom/git_working/Emby.ApiClient.Java/android/src/main/java/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java:4: error: package mediabrowser.model.dlna does not exist import mediabrowser.model.dlna.*; But I can't figure out how to fix this one. It looks like the emby.apiclient.android module can't find the classes from the root project? If you could let me know how to generate apiclient.jar from the Emby.ApiClient.Java repository I'd be grateful. Thanks. Link to comment Share on other sites More sharing options...
ebr 14862 Posted October 24, 2016 Share Posted October 24, 2016 It is setup as an Eclipse project and you need to have all of the proper SDK and JDK components installed and configured. However, that url should not be a problem (but I can change it in the project). What error were you actually trying to correct? Link to comment Share on other sites More sharing options...
ta264 1 Posted October 24, 2016 Author Share Posted October 24, 2016 Ah OK. I tried using gradle on linux and Android Studio on Windows 10 but didn't try eclipse. Occasionally I get an error like this in the log: 4:21:59.290 [main] DEBUG App - Adding request to queue: https://xxxx/emby/mediabrowser/users/fce8ab3b4c154e2d84b1827801a30be6?format=json 14:21:59.332 [main] ERROR App - VolleyError com.android.volley.ServerError: null com.android.volley.ServerError com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:179) com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114) Nothing seems to be broken, I just thought the URL looked suspicious and it would give me a reason to go through all the motions. Link to comment Share on other sites More sharing options...
ebr 14862 Posted October 24, 2016 Share Posted October 24, 2016 That url is definitely wrong... Link to comment Share on other sites More sharing options...
ta264 1 Posted October 24, 2016 Author Share Posted October 24, 2016 My emby instance is behind an nginx reverse proxy at https://xxxx.com/emby, so other requests look like https://xxxx.com/emby/emby/... so it's perhaps less broken than it looks at first Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now