[Monodroid] New build error, unable to build
Paul Camacho
paul.camacho at gmx.de
Thu Mar 3 11:03:12 EST 2011
I get this error often interactively, right after I hand-edit a layout XML. It's *always* been about me forgetting a closing bracket, every time. With interactive I mean: do the build, deploy, change layout, build, oops error. So I knew exactly where to look and never really bothered to read the actual message text. BTW I think I ran into that sample yesterday as I googled "xmlns:binding" but then Jon's post popped in.
Am 03.03.2011 um 16:44 schrieb Chris Erickson <chris at cartopac.com>:
> 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/MultiTargetSampleMonoD
>>> 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.bin
>> 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.bin
>> 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=too
>> ls/aapt/XMLNode.cpp;h=c0d74275a8a6a6883fedeed008ab6e993e4658cc;hb=HEAD#l49
>>
>> 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