简体   繁体   中英

Generate Gradle Build files complains about missing dependencies

I am trying to import this Android Backend Starter Client project into Android Studio. It's an Eclipse project which means that to import it into Android Studio it needs to be exported from Eclipse with the Generate Gradle Build files option.

The project has as dependency Google Play services. I have imported the Google Play Sevices source code from the SDK as another Eclipse project.

The issue is that when I try to export the main project, Eclipse complains that it cannot find the Google Play Services project, even though the project is open in Eclipse. See the image below.

在此处输入图片说明

I have to mention that both of the projects are compiling and that I am using the Windows version of Eclipse.

I managed to export the project from eclipse. The issue was that the google-play-services_lib project was not located in the same workspace as the solutions-mbsac project. Once I moved it to the same workspace the export worked.

To import it into Android Studio I still had to modify the generated gradle.build files a bit and to update to the latest gradle.

The Eclipse export generates paths for the source files, but it generates them with \\ . This causes the import into Android Studio to fail. The \\ need to be replaced with / .

To update to the latest gradle I just replaced the dependencies in the gradle.build file and replaced the gradle-wrapper files with other files generated by Android Studio.

After making all these changes the project imported successfully into Android Studio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM