[Monodroid] New build error, unable to build
Chris Erickson
chris at cartopac.com
Thu Mar 3 12:15:36 EST 2011
A slight correction to this, for styled attributes you must use the
namespace
xmlns:binding="http://schemas.android.com/apk/res/your.package.name"
This builds fine.
Chris
On 3/3/11 8:44 AM, "Chris Erickson" <chris at cartopac.com> wrote:
>Grr, I need to get better at digging through those error messages. I was
>following an example from an android project, and that's how they had done
>their namespace, so I didn't think to look there.
>
>Thank you,
>
>
>
>On 3/2/11 5:21 PM, "Jonathan Pryor" <jpryor at novell.com> wrote:
>
>>On Mar 2, 2011, at 4:41 PM, Chris Erickson wrote:
>>> I'm unable to build again, with an unhelpful error. Can anybody add
>>>any insight?
>>
>>What, the following isn't clear enough: ;-)
>>
>>>
>>>/Users/chriserickson/Projects/MultiTargetSampleIOS/MultiTargetSampleMono
>>>D
>>>roid/obj/Debug/res/layout/main.axml:9: error: No resource identifier
>>>found for attribute 'text' in package 'com.cartopac.android.binding'
>>
>>As per your later email, you have:
>>
>> <LinearLayout ...
>>
>>xmlns:binding="http://schemas.android.com/apk/res/com.cartopac.android.bi
>>n
>>ding"
>> >
>> <TextView ...
>> binding:text="TextDisplayBinding"
>> ...
>>
>>The problem is that `aapt` doesn't like this. At all.
>>
>>Doing the same thing (custom xmlns declaration + binding:text attribute)
>>within Eclipse results in the same error.
>>
>>However, one thing that stood out to me was:
>>
>>
>>xmlns:binding="http://schemas.android.com/apk/res/com.cartopac.android.bi
>>n
>>ding"
>>
>>This didn't strike me as being "kosher," as you're sticking your own
>>custom string after someone elses TLD. Don't do that.
>>
>>In fact:
>>
>>
>>http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=to
>>o
>>ls/aapt/XMLNode.cpp;h=c0d74275a8a6a6883fedeed008ab6e993e4658cc;hb=HEAD#l4
>>9
>>
>>If an XML namespace starts with RESOURCES_PREFIX, aka
>>RESOURCES_ROOT_NAMESPACE, aka "http://schemas.android.com/apk/res/", then
>>`aapt` considers the namespace to be "public" and treats it specially,
>>which is your actual problem.
>>
>>Consequently, if I change the above xml namespace declaration to:
>>
>> xmlns:binding="http://com.cartopac.android.binding"
>>
>>then `aapt` builds the Eclipse project fine, so I believe the actual
>>problem is that you chose a terrible xml namespace ID.
>>
>> - Jon
>>
>>_______________________________________________
>>Monodroid mailing list
>>Monodroid at lists.ximian.com
>>
>>UNSUBSCRIBE INFORMATION:
>>http://lists.ximian.com/mailman/listinfo/monodroid
>
>_______________________________________________
>Monodroid mailing list
>Monodroid at lists.ximian.com
>
>UNSUBSCRIBE INFORMATION:
>http://lists.ximian.com/mailman/listinfo/monodroid
More information about the Monodroid
mailing list