Were you able to find a work around to this problem? On Jul 8, 6:27 am, Vladimir Lebedev-Schmidthof <[email protected]> wrote: > Hello, > > Having custom attribute (in attrs.xml) in library project leads to > compilation fail of the project dependent of that library. > > I.e.: > MyLib project (library) > > AndroidManifest.xml: > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.mycompany.test.lib" > android:versionCode="1" > android:versionName="1.0"> > ... > </manifest> > > res/layout/main.xml: > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > xmlns:my="http://schemas.android.com/apk/res/ > com.mycompany.test.lib" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > <com.mycompany.test.lib.MyWidget > android:id="@+id/my_widget" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > my:customValue="324"/> > </LinearLayout> > > res/values/attrs.xml: > <resources> > <declare-styleable name="MyWidget"> > <attr name="customValue" format="integer"/> > </declare-styleable> > </resources> > > And there are nothing in TestApp except AndroidManifest.xml: > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.mycompany.test.app" > android:versionCode="1" > android:versionName="1.0"> > ... > </manifest> > > And aapt says that > res/layout/main.xml:13: error: No resource identifier found for > attribute 'customValue' in package 'com.mycompany.test.lib' > > How to avoid this except for no having custom attributes in library?
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

