Generate cloud endpoint client library suddenly stopped working - android

Normally when I right-click my app engine project and choose "Generate cloud endpoint client library" using the Google plugin for Eclipse, it generates the client libraries and automatically copies them into the Android client project.
However, for no apparent reason, the client library is no longer being copied to the client project. In fact, it has been removed (so now I have a lot of errors in my project because it can't find the libraries).
I've tried re-generating the client library which completes without any errors but the problem persists. Interestingly, it seems to complete the process slightly faster than it used to.
I've tried cleaning all projects.
I've tried manually adding the generated source folders from endpoint-libs, but I can't because the generated folders no longer exist. There is also no longer any reference to them in the Java build path for the client project.
I've tried checking out an older version of the code where I know the plugin worked, and the problem occurred there too which leads me to believe it is not a problem in my code.
I also tried deleting the project in eclipse and re-importing everything.
What happened? I've used the generate function many times before and it worked every time until now. I think it started after doing a project clean.
An Update
I followed the suggestion here and was able to generate the client library for one of my endpoints, but the actual .jar file which is needed was not generated (the generated readme file even specifically states the filename and location of the jar but it does not exist).

The issue tracker shows that this issue was resolved (https://code.google.com/p/googleappengine/issues/detail?id=9746).
Also #howettl posted above in the comments that this issue was fixed.
There were some questions in the issue tracking about remote servers being involved and the fix not requiring an update to the GPE. This appears to be related to the fact that there is a Google web service used by the GPE for generating some of the cloud endpoint code.
If this web service is not working (routing issue, server issue, etc), or you don't have a connection to the internet, you will not be able to generate (or regenerate) cloud endpoints for your project.
Also if your generation is slow, it might be due to your internet connection speed.

Related

Android app no longer linking to existing firebase project

Using android studio, I created an app and linked it to a Firebase project.
I opened the app on my android studio recently and discovered it wasn't linked to my Firebase project any longer. I checked the Firebase console and saw that the app was still connected. However, it's still not reflecting in my android studio.
When I try to connect my app to Firebase (afresh), I can clearly see my Firebase project as one of the options (with one app connected ==> my app).
In summary, how do I reconnect an app to firebase?
I have tried restarting my android studio, cleaning the project, invalidating cache and restarting.
As long as there is no external tampering with an android studio project, an android app would always remain connected to Firebase.
I was able to solve this problem by signing out of all my Google accounts and then signing in with the account associated with the project. All I had to do after was attempt to reconnect again and kAbOoM, it worked fine.
There are two extra checkers/fixes I'd recommend to anyone that runs into this problem:
Check whether the google-services.json file exists. It's usually in the /app directory of android projects. If this file does not exist, it means the app is not connected to any Firebase project. One can then proceed to connect one's app to Firebase either manually or on the android-studio IDE. If the file exists, proceed to 2.
Dependencies: A lot of Firebase-type problems stem from dependency issues. Ensure the following:
Avoid version conflicts Ensure that all dependencies are up-to-date Take warnings seriously, they are like seedling-errors
I hope this helps other people who might run into this error.. Merry coding!

Xamarin Android Support lib references broken since installing Google Play Services

I have a project that I attempted to install Google Player Services through NuGet. Since trying to install the google package, my android support libraries as well as the google play service libraries are all showing up in my references as broken, no matter how I try to add, reinstall or change the references. They always break, throwing The "ResolveLibraryProjectImports" task failed unexpectedly. as an error in response.
I have looked around and tried everything that sounded remotely like my issue, to no avail. Any help would be appreciated.
I am running Xamarin v4.3.0.789 (4d2ed3d) with Xamarin.Android v7.1.0.43 (4a52f1e)
Not entirely sure why this fixed the issue. However after looking through, I realised that version of my packages had been updated, I assume that Google Player Services forced that, which then caused my whole project to go haywire.
Installed the version of packages I was using beforehand and it works again.

Connecting different Android project to an existing Google-Endpoints Backend

I am working on an Android project that needs three versions of the same application (for example: Admin version, User version, Custom version). I have already created a Google-App-Engine endpoints backend in the User version of the app. I have to start working on the other two versions now and I want to connect these two versions to the backend I created in the User version. I have tried finding the answer to this on the internet but I haven't been successful in doing so. I believe it is possible to connect the other versions of the app to the backend by importing the endpoint libraries from the cloud into the android projects somehow but I haven't been able to find a way to do so yet.
I did come across a way to import an existing module in the Android project but if I do that, then any time when I make changes to the backend in the "User" version, I will have to re-import the module in other versions of the app. I am so lost and confused.
Any help will be deeply appreciated.
Thank you!
After you build your cloud module there is a YOUR_CLOUD_MODULE_NAME-android-endpoints.jar under YOUR_CLOUD_MODULE_NAME/build/libs.
You can copy this jar into libs directory of all your android projects that need to interact with your back-end.
This approach makes it really easy to get out of sync though. After every change to back-end you would need to update the .jar in all dependent modules.
Are all of your Android applications in the same Android Studio project? If so I think you might be able to just add
compile project(path: ':{yourBackendModuleGoesHere}', configuration: 'android-endpoints')
to each of your Android apps build.gradle.
You could probably also make it work even if your backend is in a separate AndroidStudio project as long as they're part of the same gradle build.

Generating API metadata for Cloud Endpoints, brand new project

So, I've basically created a new project in Android, with nothing but the blank sample activity. I right click the project folder and chose "Add App Engine Backend". I supply it with the key and project number for the project on Google Cloud. When I'm done creating it I'm prompty met with this error.
"There was a problem generating the API metadata for your Cloud Endpoints classes: com.google.api.server.spi.tools.ClientLibGenerator$Language"
Any ideas?
Edit:
Here's what I've tried so far:
Delete the project, restart the computer and create it again.
Downgrade to Google Plugin 3.8/4.2 for Eclipse from 4.3.
Create the project as an App Engine Connected Project.
I get the exact same error every time, wether or not I'm giving out the key and project number. I have no idea of what I'm doing wrong.
Switched from app engine sdk 1.9.4 to 1.9.3 and it worked like a charm.

Can't sign blackberry android app: Server response did not contain version

I'm trying to sign my Blackberry Android (ported) app for release to App World, but I can't get the tool to work. I've tried the eclipse plugin, the command line tools, and the online tool, but none will work. The eclipse plugin and command line tool just say:
Error: Server response did not contain version.
The online tool says that:
This APK was already packaged and signed, please update the APK’s version number to package again
Even though I've never successfully packaged it before. Does anyone have a solution to this problem?
Solved! It turns out that I did need to increase the version number, even though it had never successfully signed. The Blackberry signing server decided that versions 1 and 2 had already been signed (though they hadn't), so I just had to keep going until it worked.
Error: Server response did not contain version.
This error made me think that that wasn't the problem, but apparently both errors mean that the version is already in use. Just keep incrementing the version number until it works.
Need to increase the version code, until it works. This link might be helpful

Categories

Resources