app declares a dependency from configuration 'compile' to configuration 'android-endpoints' which is not declared in the descriptor for project :backend.

820 views
Skip to first unread message

Carlos Lee

unread,
Dec 24, 2017, 1:53:59 PM12/24/17
to Google App Engine
I have a  Androiud project that uses Android Studio with backend module.

I'm trying to migrate google appengine from V1 To V2 as per tutorial: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating

After perform all changes as per tutorial, I'm getting following error in my app build.gradle:

Could not resolve project :backend.
Required by:
    project :app
 > Project :app declares a dependency from configuration 'compile' to configuration 'android-endpoints' which is not declared in the descriptor for project :backend.

This is pointing to line: compile project(path: ':backend', configuration: 'android-endpoints')

android {
...
}

dependencies {
    ...
compile project(path: ':backend', configuration: 'android-endpoints')
    ...
}


Looks like I can no longer use configuration: 'android-endoints'.

Can anyone help me to fix this problem?

Thx in advance.

George (Cloud Platform Support)

unread,
Dec 26, 2017, 1:44:54 PM12/26/17
to Google App Engine
Hello Carlos, 

Have you updated the build.gradle file with the following dependencies section? 

dependencies {
   
// V2: Endpoints Framework v2 migration
    compile
'com.google.endpoints:endpoints-framework:2.0.9'

    compile
'javax.inject:javax.inject:1'
    compile
'javax.servlet:servlet-api:2.5'
}
The "Migrating Android projects to Endpoints Frameworks 2.0" documentation page is appropriate in your case. You should chose the "v2" tab at the top of the code window in the "Update the app/build.gradle" sub-chapter. 

Carlos Lee

unread,
Dec 26, 2017, 10:03:47 PM12/26/17
to Google App Engine
Hello George,

Really thx for your reply. I've followed the tutorial: https://cloud.google.com/endpoints/docs/frameworks/java/migrating-android That You've recommended and Now It's working fine. As a developer, I piece of code worth more than million tutorials and the github project inside this tutorial: https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/endpoints-frameworks/v2 Had been very usefull to complete this migration. :)

In the migration e-mail, I've received that another one tutorial I was following.

Just to complete your tutorial, I had to change backend.iml to fix the error: "Unable to find the webapp directory ../build/exploded-app."
Change:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-app" />

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

Regards

Carlos Eduardo Ki Lee

George (Cloud Platform Support)

unread,
Dec 27, 2017, 2:05:32 PM12/27/17
to Google App Engine
Glad to see you have solved the issue. Most grateful for the extra details: these might prove of utmost importance for those who want to solve a similar problem.  
Reply all
Reply to author
Forward
0 new messages