From this error from the latest tagged build, it shows the Android client needs to use Octokit to be able to deploy the Android client to the Play store.
GET https://api.github.com/user: 401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)
I think this is wrapped in the gradle-play-publisher plugin, so if it’s the case then we should update the gradle files to match the latest version of the plugin, we might fix the error this way. But there are lots more possibilities on why this error comes up. Does anyone know a good solution to this?
@f4ww4z, one of the possible situations resulting in Bad Credentials is the revoking of the GITHUB_API_KEY (in .travis.yml file).
Kindly check if the the key isn’t revoked. Most of the solutions to this problem was OAuth Token being revoked by the Admin.
This solution is working fine, but now I’m seeing that the APK file is not found. I was thinking of using a regex to find all the .apk files under the outputs/apk folder, as there is no more than 1. What is your input to this @vankineenitawrun@deepak140596 ?
@f4ww4z, on my system for a custom app, the output for release folder is now at : \app\release\app-release.apk
while for debug, the folder is at: \app\build\outputs\apk\debug
Seeing at the travis.yml file, the search location for output file resembles the debug. But the release path is different. I think this is causing the search to fail.
Also in the build.sh file, there is no custom path defined to create or build the apk. Therefore the release build will be created at the default path.
Thanks @f4ww4z. I have been digging into this for quite a while now.
I tried creating a release version of OpenMRS and it was created by default in the folder \openmrs-client\release\openmrs-client-release.apk .
There are two solutions to the above problem. But at first we should acknowledge that there are 2 different directories concerned. First is the Output Dir and second is the Search Dir.
One solution will be changing the output dir and the second the solution (much easier) will changing the search dir.
We don’t necessarily have to change the default output dir, just need whatever the default dir and explicitly add it to the Gradle file and travis. What are you referring to by search dir? Any example we can see?
Yes, this is a part of what I said before. So because sometimes Android changes the build dir for any variant, we can just specify the current one in build.gradle . Then we set the same location in yml line 17. See the link I gave in AC-585 .
@vankineenitawrun@f4ww4z, I found an issue regarding building of debug app. The debug app is now being built in the same space as the release build (openmrs-client/release/ .apk).
Therefore Android Stuido is not being able to find the location of the debug app to install on device for testing purpose.
One solution will be to build the debug app and manually transfer the app to the device and install it for testing purpose. Second solution will be to change the default path in Android Studio to search and install for the debug app.