Error "Resource identifier not found for attribute" rectLayout ""

I tried to create a new project for android wear in eclipse but there is a problem in the main layout, I am not now, how can I solve it, this is my main layout:



it gives me this error:

Multiple annotations found at this line:
    - error: No resource identifier found for attribute 'rectLayout' in package 
    - error: No resource identifier found for attribute 'roundLayout' in package 


My project has two layouts "rect.xml" and "round.xml" and it compiles with 4.4W and the target is 4.4W and also I have a copy of classes.jar in libs folder.


source to share

4 answers

The code you posted is fine. The problem is that you have a copy classes.jar

in your folder /libs

, but this is the wrong way to use wearable-support-lib correctly . This wearable-support-lib contains some resources that cannot be packaged inside the file .jar

, so you need to import it as a " Library Project " and attach it to your project like other external libraries.

You need to go back to the file wearable-1.0.0.aar

located in relation to your sdk folder:

  • Expand the entire file wearable-1.0.0.aar

    anywhere in your workspace. You will see that it looks almost like a standard android project.
  • Move classes.jar

    to /libs/classes.jar

    - within this project, not your own project.
  • Now you need to create a new project from these files with the package name

  • Compile it with API 20 and check the "Is a library" checkbox in the project properties on the Android tab .
  • Add a link to this library project from your project.

You can see more details on using wearable-support-lib in my other answer and in this excellent blog post (Benjamin Cabet).



I just added the following code in the dependencies section in the module build.gradle

module: compile '' compile ''



I was having this problem too, in my case I solved it by right clicking on the AppCompat map and then clicking the refresh button, do it with your project folder.



What worked for me was changing this: XMLNS: app = ""

To: XMLNS: app = ""

Where com.mydomain.myapp is the bundle ID of my app.

Presumably the res-auto function didn't work in my project for some reason.



All Articles