GCloud AppEngine under Eclipse doesn't start (Mac OS) - google-app-engine

I want to run a GCloud App Engine (Spring Boot Application) in Eclipse under Mac OS. When I start the App Engine, I get the following error:
The Google Cloud SDK could not be found in the customary locations and no path was provided. -> [Help 1]
The SDK is installed, the installation path is set to the PATH variable. The app-engine-java component is also installed. Eclipse also finds the installed SDK and the Eclipse Plugin for Google Cloud is also installed.
Does anyone have an idea what the problem could be?

Adding the following to the module's build.gradle might help:
appengine.tools.cloudSdkHome="/Users/marioyoussef/Desktop/google-cloud-sdk"
OR
Create a symlink inside your user folder to the installation folder of the GCloud SDK.

Ah, it's working now.
Solution is to create a symlink inside your user folder to the installation folder of thew GCloud SDK.

Related

Intellij Keeps Telling Me "App Engine SDK path is not correct.'

Trying to deploy my first Google Cloud Java app using Intellij. I've followed and read so many threads and have gotten absolutely nowhere on what is seemingly one of the simplest steps of getting this set up. I have installed gcloud CLI and followed the instructions here. After installing, I run the commands 'gcloud components update' and 'gcloud components install app-engine-java'. I see the folder located in both 'C:\Users<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine' and 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine'. I installed as multi user after hours of trying to get the single user install working, so now I have both. When in Intellij I am creating a new Google App Engine project under Java EE, it asks to specify a Google app engine SDK. There are no options so I choose to select the path. I have tried both above paths and it only tells me 'App Engine SDK path is not correct'. What am I doing wrong?? The steps seem ridiculously simple and it just doesn't work.
You stopped at the general google app engine folder
You need to specify the full path to the java-sdk folder, see the image in this question.

How to run GoogleAppEngineLauncher in terminal window(Google cloud SDK shell)?

Google no longer support the GoogleAppEngineLauncher program.
When I installed GoogleAppEngine I just got Google Cloud SDK shell. I want to add a project to GoogleAppEngine to run and deploy.
I got these links and cant understand
Local Development Server
Deploying the Application
How to do it both locally and online ?
"Quickstart for Windows" is a good starting point for new users of Cloud SDK.
In order to deploy and run a GAE application with the Cloud SDK you have to use shell/command prompt, as opposed to GoogleAppEngineLauncher where you had a GUI. The steps are:
Open the shell
In the shell change the current directory to where your project's app.yaml. is. For example: CD C:\Users\AQueue\Projects\MyGAEApplication and check that app.yaml file is there using dir command.
run gcloud app deploy
This should be it.
gcloud is one of the most important tools in the SDK that allows to interact with many products and services from Google Cloud Platform. If you want to read more about gcloud you can start with this overview.

Pycharm does not find GAE installation

When I create a new Google App Engine project with PyCharm, the App Engine SDK Directory field is automatically filled with the correct value.
The path name is the same used to run the app and the app runs without problems, but the Create button is grayed out and the message Please select App Engine SDK directory does not go away.
The folder is C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin.
How do I fix it?
In case you haven't already used the Cloud SDK to deploy or run the local development server, install the App Engine Python component of the SDK manually:
gcloud components install app-engine-python
Change your App Engine SDK path in PyCharm to:
C:\Users\<user-name>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\app_engine\
When installing google Cloud SDK, the appengine is not being installed automatically. So you have to install it before first use of google Cloud SDK.
If you install google cloud SDK for current user google_appengine path is
C:\Users\<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\
If you install google cloud SDK for all users the google_appengine path is
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform

Google App Engine: how to generate discovery doc for iOS (gradle build)?

I am using Android Studio to develop my ( GAE + Cloud Endpoints ) server, and I need to generate a discovery doc for iOS.
Google doc: Generating Client Libraries shows two ways to generate discovery doc for iOS:
using Maven
My backend project is developed in Studio and build by gradle, so I can not take this option.
using endpoints.sh (Change directory to the parent directory of your project's /war directory.)
I do not have the /war directory in my gradle build structure.
How do I generate client-library for iOS ? Can any one help with this?
Thanks to #Opal!
after running gradle war there is a generated directory called backend/build/discovery-docs which contains:
apiname-v1-rest.discovery
apiname-v1-rpc.discovery
so I got discovery doc for iOS, there is no need to run :
using endpoints.sh (Change directory to the parent directory of your project's /war directory.)

Can't import library into Google App Engine project

I use the Google App Engine SDK 1.8.5 with Eclipse 3.8 on Ubuntu.
I want to add the Cloud Storage service to my app, so I downloaded guava-gwt-15.0.jar and appengine-gcs-client-0.3.jar, and put them in my apps /war/WEB-INF/lib/ folder. I also added these jars to the build path in Eclipse.
When I fire up my app in dev mode, it runs fine, at least until I try to access a page relevant to the GCS library. When I do that, I get the following error:
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.appengine.tools.cloudstorage.GcsServiceImpl.<init>(GcsServiceImpl.java:35)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:32)
... etc
I cleaned my project and restarted Eclipse multiple times, and still the problem persists. What to do?
In addition to Guava for GWT, you also need the core Guava library (guava-15.0.jar). Download the .jar to war/WEB-INF/lib and add it to you build path as well.

Resources