Project imported from Eclipse to Androidstudio has no R reference

Asked

Viewed 131 times

4

I imported a project from Eclipse for Android Studio, but he has no reference to the old R.

  • 1

    File -> Invalid Caches/Restart. If it does not work check the import if it is correct

  • Didn’t. I’ll try to import again. When I create a new project, no problem at all!

  • Did not resolve! :(

2 answers

0

Perform the following steps:

  1. Open Android Studio (Updated version v1.0.2 [CURRENTLY]);
  2. Select the option -> NON ANDROID STUDIO PROJECT;
  3. Navigate to your Eclipse project folder and select it;
  4. Wait for the build through Gradle;
  5. Sync Gradle after project setup;
  6. Ready! :-)
  • I am updating. I was with 1.0.1, so I will finish the test and put the result here!

  • I updated, I imported the project again. I did all the steps you said. Unsuccessful. R has no reference; no logic!

  • I imported another project that has nothing. It’s just new. It worked, now this other one is giving error in this reference

  • Put the bug here!

0

One of the possible causes is some syntactic problem in one of your XML.

Remember that the R.java file is a file generated to allow your Java codes to reference XML elements. When there is a problem in XML, the R file cannot be generated and therefore cannot be imported.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.