I am trying to import from Eclipse to AndroidStudio a project of mine and I am getting the following error
First I do not understand why it does not replace the google play services lib for the corresponding entry in the gradle file.
What should I do in order to fix the situation? Any guidance or link to a tutorial would be helpful.
An alternative is to simply set the path. You'll need to have installed play services via the Android SDK to use it with Android studio anyway.
Once play services are installed, if you highlight the Google play services entry in the Android SDK manager it will show you the path to the install location. On MAC this is normally something like /Users/[homedir]/android-sdks/extras/google/google_play_services/libproject
Edit the path in project.properties to point to this file and it will import. You can then update your gradle build file as necessary.
I just changed it works for me
android.library.reference.2../google-play-services_lib which changed to
as
android.library.reference.google-play-services_lib
I think "removing the line in the project.properties file that was making reference to the google-play-services_lib library" is not a good fix. To really fix it do either of these : Just edit the location of the path to google-play-services_lib in project.properties file in your Eclipse project root directory.
android.library.reference.1=path/to/the/google-play-services_lib
e.g :
or replace "\" with "\" like below :
otherway is - just look at the last portion of the last line of the error ....which resolves to
...folder_name/google-play-services_lib
just create a folder at that location and paste google-play-services_lib from your
google_play_services\libproject\google-play-services_lib
Well, there might be another way of solving this problem, but I ended up removing the line in the
project.properties
file that was making reference to thegoogle-play-services_lib
library.The easiest and simple solution is to copy
google-play-services_lib
folder from another project or SDK folder and past it to the location which is address in the error. By removing or commenting line in theproject.properties
will create errors in the project and won't allow you to build unless you take necessary steps and fix.The simplest solutions is remove this line of code , android.library.reference.2=../google-play-services_lib,from project file (you will find it in project's root folder ) rest android studio will handle itself
Find the file: