R not identified after upgrading to Android v.21

I have Eclipse Luna installed on my Mac and last night I downloaded from the sdk manager the latest android sdk (v. 21 Android 5.0). Unfortunately, after updating, I got a few errors that I tried to resolve by following the instructions in several posts here on Stack Overflow. 1. In java build path in Android Dependencies, jar file for Appcompact 7 is not found in bin folder. I read that it was because I had to set 21 as the project target for the support library, then clean and build the library project so that the jar file is automatically generated under the bin folder, but it doesn't, t happened.

2. I added the library jar file under the bin folder manually. At this point, instead of having an exclamation mark in the project name, I have all the files in the src folder marked with errors, as the R file is no longer recognized. I don't have any errors in any XML file, but still no R resources were found in the project. 3. Every time I try to change the target sdk file for my project to 21 or 21 using google apis, I get the error "Data analysis for Google Inc .: Google API: 21 could not save unsupported major.minor version 51.0 ". I read that it probably has to do with the version of jdk installed on the computer, so I updated it to version 8 and changed the compiler in Eclipse to version 1.8. This didn't solve the problem and I reverted it back to 1.6.

4. The Problems tab contains the following errors:
- Importing com.google.android.gms is not possible.
- R cannot be resolved to a variable;
- the initializePoolObject () method of type DBObjectStructure must override the superclass method.

Do you have any idea how to get back to work without any problems?

+3


source to share


4 answers


  • Importing com.google.android.gms is not possible.

    com.google.android.gms comes with an SDK Services Service that you attach to your app project as an Android library project. Check your environment to make sure you have a valid copy of the Play Services Library project and the application project still points to this.

    Install new Play Services:

    Follow google instructions to install 'google-play-services-lib'.

    This is documentation.

  • R cannot be resolved to a variable

    Make sure your compilation and target versions are set to 21. This is because the new AppCompat only compiles to 21.

    Right click on the project and select Properties. Then select "Android" from the tree on the left. Then you can select the target target version on the right.

    Note. Make sure your project properties, classpath and files are writable, otherwise it won't work.

  • The initializePoolObject () method of type DBObjectStructure must override the superclass method.

    You need to update your jdk version to 1.8 to overcome this Error. Also change the java compilation version of your project to 1.8 in eclipse.



0


source


When creating a new project for Lollipop, Android Studio warns that Java 7 is required. I know java 8 is not supported in Android yet, so this won't work, but I suggest you go with the latest java 7 update, maybe the problem is the same in Eclipse , there is simply no warning.



0


source


to fix the R not identified error moved to android studio. The .8 version should be sufficient proof that the beta is of release quality.

For eclipse, remove the imports of myapp.R and then re-add them, this has worked for me in the past.

0


source


Try using other IDEs such as Andorid Studio or InteliJ IDE, resolving your error as much as possible.

-1


source







All Articles