Closed ricardoalcocer closed 10 years ago
You should define attributes only once. Please look at your code and if you define textAllCaps and deviderPadding more than once remove it then try again.
Yeah, that's the thing, I'm not defining anything like that. Could it be related to the fact that Titanium 3.3.0 now uses AppCompat?
I don't think so. Can you paste here your compiled attrs.xml?
Sure. Here:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<declare-styleable name="PagerSlidingTabStrip">
<attr name="indicatorColor" format="color"/>
<attr name="underlineColor" format="color"/>
<attr name="dividerColor" format="color"/>
<attr name="indicatorHeight" format="dimension"/>
<attr name="underlineHeight" format="dimension"/>
<attr name="dividerPadding" format="dimension"/>
<attr name="tabPaddingLeftRight" format="dimension"/>
<attr name="scrollOffset" format="dimension"/>
<attr name="tabBackground" format="reference"/>
<attr name="shouldExpand" format="boolean"/>
<attr name="textAllCaps" format="boolean"/>
</declare-styleable>
</resources>
I was able to pack the app properly with 3.2.0.GA, so it appears to be something with 3.3.0.RC.
Does this here means that AppCompat is already defining those values?
Maybe, I didn't use AppCompact with this library. And I didn't try this with even 3.2.0.GA. I used 3.1.3.GA. Can you remove these attributes from attrs.xml and compile again and see if you can compile successfully?
I don't think I can remove them...the attr.xml is auto-generated at build time, AFAIK. Do you know of a way?
On Thu, Jul 17, 2014 at 8:01 PM, dreamlearn notifications@github.com wrote:
Maybe, I didn't use AppCompact with this library. And I didn't try this with even 3.2.0.GA. I used 3.1.3.GA. Can you remove these attributes from attrs.xml and compile again and see if you can compile successfully?
— Reply to this email directly or view it on GitHub https://github.com/dreamlearn/viewpager/issues/5#issuecomment-49390936.
Yes, You can. You have to remove the attributes from viewpager in follow path: platform->android->res->values->attrs.xml
this file is in follow url in my repository: https://github.com/dreamlearn/viewpager/blob/master/platform/android/res/values/attrs.xml
Let me know if it works.
Hi. I can confirm that it works with Titanium 3.3.0 by changing the modules attr.xml like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="PagerSlidingTabStrip">
<attr name="indicatorColor" format="color" />
<attr name="underlineColor" format="color" />
<attr name="dividerColor" format="color" />
<attr name="indicatorHeight" format="dimension" />
<attr name="underlineHeight" format="dimension" />
<!--<attr name="dividerPadding" format="dimension" />-->
<attr name="tabPaddingLeftRight" format="dimension" />
<attr name="scrollOffset" format="dimension" />
<attr name="tabBackground" format="reference" />
<attr name="shouldExpand" format="boolean" />
<!--<attr name="textAllCaps" format="boolean" />-->
</declare-styleable>
</resources>
Naturally the values can be removed altogether.
I glad to hear that. I want to close this issue so did your issue solve?
Yeah, fixed and closing. Thanks.
When you have a chance, write me an email to alco [at] ricardoalcocer . com . Have something to share with you about this module.
I'm getting a packaging error when trying to compile an app using Titanium 3.3.0.RC.
[ERROR] Failed to package application: [ERROR] [ERROR] /Users/ralcocer/Dropbox/Work/Manning/2014/code/ch4/TiConference/build/android/res/values/attrs.xml:9: error: Attribute "dividerPadding" has already been defined [ERROR] /Users/ralcocer/Dropbox/Work/Manning/2014/code/ch4/TiConference/build/android/res/values/attrs.xml:14: error: Attribute "textAllCaps" has already been defined
Any ideas?