0

While importing projects(project was created in eclipse) into Android Studio I have some problem:
1) R.file and methods are cannot be resolved

2) `Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\StormY\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 Error:(153, 28) No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').`

Why did this happen? How can I fix this?

GorvGoyl
  • 42,508
  • 29
  • 229
  • 225
Stormy
  • 1
  • 2

3 Answers3

1

You need to import the play_services_lib project into your workspace. And then add this library to you project by going to

Your Project -> Properties -> Android -> Library

Checkout this link for detailed explanation on how to import the play_services_lib into your workspace

http://developer.android.com/google/play-services/setup.html

After this the error will vanish and you need not add any fixed value.

Exception
  • 2,273
  • 1
  • 24
  • 42
1

According to the log, you are missing the google play services module.

Using google play services is different between eclipse and android studio. in eclipse you had to create a module and add a dependency on it. in android studio this is no longer needed. you should: a) remove the google play services module from your project if it has been imported with it.

b) Add a gradle dependency on the current play services version (see the docs for step by step instructions).

c) Make sure you Sync Project with Gradle Files (step 3 in the above link).

This should import google play services correctly which means your project would find google_play_services_version and compile successfully.

Oren
  • 4,152
  • 3
  • 30
  • 37
0

You have to update the android repository, the support library like Google play services in your gradle for app module this dependency:

compile 'com.google.android.gms:play-services:6.5.87'

prior to this you have use eclipse in which you included libraries by importing them in eclipse but in android studio you have to mention them in build.gradle and after that you have to sync your gradle

like this enter image description here

this is the place where you will find app.gradle i have highlighted the file which you need to edit enter image description here

Pankaj Nimgade
  • 4,529
  • 3
  • 20
  • 30
  • ye ty it works, but now as i said from beginning all metods is unresolved? for example : Error:(15, 2) error: method does not override or implement a method from a supertype Error:(3, 60) error: package com.google.android.vending.expansion.downloader.impl does not exist Error:(27, 61) error: package com.android.vending.expansion.zipfile.ZipResourceFile does not exist does not exist Error:(5, 45) error: cannot find symbol class DownloaderService Error:(65, 5) error: cannot find symbol class LicenseChecker – Stormy Mar 11 '15 at 09:49
  • well this happens sometime if android studio can't make you difference between gen and src directories, check in your module what it has taken as source – Pankaj Nimgade Mar 11 '15 at 09:53
  • can you specify how to do it? – Stormy Mar 11 '15 at 09:58
  • btw I am very grateful that you are helping me – Stormy Mar 11 '15 at 10:02
  • can't get all details but this should help http://stackoverflow.com/questions/21100688/android-studio-0-4-2-suddenly-cannot-resolve-symbols – Pankaj Nimgade Mar 11 '15 at 10:12
  • in some cases which likely to happen here, if android studio encounters error it might not generate and resource related data just like eclipse. you can work way around by making a new android studio project and adding all libraries you need in "app.gradle" and then port your classes on after another – Pankaj Nimgade Mar 11 '15 at 10:19
  • nothing from links did not help ( sorry for wasting ur time, but i cant find app.gradle in my project – Stormy Mar 11 '15 at 10:36
  • @Stormy, it's ok, i have updated the answer you will find app.gradle file in that i have highlighted that in image – Pankaj Nimgade Mar 11 '15 at 10:46
  • still nothing, ill try to make new project and add lib, and copy and paste clases, but still same- unresolved metods – Stormy Mar 11 '15 at 10:59
  • @Stormy, mail me screenshot, to see how it looks, i might be able to look up something pankaj.nimgade@gmail.com – Pankaj Nimgade Mar 11 '15 at 11:15
  • @Stormy, how many library did you need in eclipse when your code was working on eclipse apart from Google play service – Pankaj Nimgade Mar 12 '15 at 09:02