Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Step 2.1 #92

Open
8Ozymandias opened this issue Nov 11, 2017 · 9 comments
Open

Step 2.1 #92

8Ozymandias opened this issue Nov 11, 2017 · 9 comments
Assignees

Comments

@8Ozymandias
Copy link

8Ozymandias commented Nov 11, 2017

After following all the instructions prior to step 2.1, everything works.

However, after following the specific instruction in step 2.1 that says:

"First, launch your back-end locally as described in section 1.1. "

I get the following error that says:

"Error:(47, 13) error: cannot find symbol class EndpointsAsyncTask"
&
"Error:Execution failed for task ':app:compileDebugJavaWithJavac'."

I've been searching for solutions online but to no avail.

Can someone please help?

UPDATE: I forgot to mention that I was operating on the version of Android Studio just before 3.0 and throughout the end part of the process I updated it to Android Studio 3.0

The following is a screenshot of what I am currently experiencing.

image

@pulakdp
Copy link

pulakdp commented Nov 27, 2017

I faced this issue too and came up with a workaround from this SO link. The steps in the accepted answer in that thread can be used as a temporary solution. Although this way of using the api is not recommended as one has to recreate the jar file for any change to the api, otherwise this will fail. README file can be edited to add this workaround for those who are facing the same issue.

@WassimErriha
Copy link

@8Ozymandias I'm stuck in the same situation. Were you able to find a solution ?

@loosebazooka
Copy link
Contributor

It turns out there is a gradle sync issues for the type of configuration that endpoints uses in Android Studio 3.0 that is causing this.

The recommended approach is to convert your application to use the new tooling which approaches the dependency differently, you can follow one of these guides to migrate your application

  1. cloud documentation : https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating-android
  2. github documentation : https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md

@HossamOnsy
Copy link

HossamOnsy commented Dec 17, 2017

It Turns Out Android Studio 3.0 has this issue of changing the backend directory name and in result these issues occur
follow this as it helped me out and had the 2 issues i have faced
StackOverFlow link
in short it shows you the Read.MD which can be modified in order to solve the MyApi Class can't resolve issue and another issue of backend server not working at some point due to cannot process : working directory ........................ endpoint-app doesn't exist and the solution is to modify
the backend/backend.iml

Change:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-app" />

To:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-backend" />

@8Ozymandias
Copy link
Author

@tbs99 I appreciate the response and solution. I am curious though, how were you able to figure this out. I was going to officially start-over my app to Firebase today due to all this headach.

@8Ozymandias
Copy link
Author

@loosebazooka I appreciate the solution in the response. I apologize for not responding sooner.

@loosebazooka
Copy link
Contributor

@tbs99 that is not exactly true. The synchronized state is stale information from the older plugin : https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md#android-studio. The new plugin does not provide synchronized state and as you are expected to use the gradle tooling directly to do anything.

@HossamOnsy
Copy link

@loosebazooka i didn't say it was exactly true that's why i added the SO link because there is a warning regarding manually checking to synchronize everything

@HossamOnsy
Copy link

@8Ozymandias well i spent a day or two figuring out why when i imported the GCE and followed the instructions nothing worked which was weird as it started from an auto Generated class called MyApi
from there i investigated and followed the trail till i found that Read.MD which explained how to fix some of the things that are most common due to gradle syncing as well as Android Studio 3.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants