Open GoogleCodeExporter opened 9 years ago
I believe this might be a declare-styleable bug. Apktool's attr decoder doesn't
handle these at all it seems.
This simple patch breaks the unit-tests by only adding 2 custom attributes
within a <declare-styleable> block. I assume this is what those issues were
using since they were custom attributes.
Needs more investigation, but confirmed with this patch since APK cannot be
shared.
Original comment by connor.tumbleson
on 12 Aug 2014 at 12:33
Attachments:
Hi Connor.tumbleson,
I deployed your patch file standards in our project. The issues still persists.
There is not much changes to the issue. We are currently experiencing the
following, after deploying the patch file:
Attribute "oakFont" has already been defined
No resource identifier found for attribute 'oakFont' in package 'android'
I am also experiencing Absence of resource identifier, that is to be found in
attributes such as 'aspectRatio', 'pstsShouldExpand','font' etc.
Please provide your inputs to the above technicalities.
Original comment by rahmanre...@gmail.com
on 13 Aug 2014 at 2:02
The patch had nothing to do with fixing anything. The patch file created
failing unit-tests since you could not provide an APK. The patch allows this
bug to be reproducible for anyone so other devs can investigate if they wish.
I have not researched the problem or investigated further. PRs are welcome
though. I would start my research in the AttrDecoder.
Original comment by connor.tumbleson
on 13 Aug 2014 at 2:10
Custom attributes defined in <declare-styleable> are just moved to global
status. IE
Original
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MyCustomView">
<attr name="custom0" format="string" />
<attr name="custom1" format="boolean" />
</declare-styleable>
</resources>
Decoded
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="custom0" format="string" />
<attr name="custom1" format="boolean" />
</resources>
The type/name of the custom attributes are maintained. They just go from a
scoped access to global, while this isn't a perfect 100% match from original to
rebuilt, it still gets the job done. Since there is no APK due to NDA I believe
the rest of the bug is a duplicate of 660 or close to that.
Maybe we will revisit this when we have less major bugs.
Original comment by connor.tumbleson
on 16 Aug 2014 at 7:10
As mentioned before, we cant share the APK due to confidentiality reasons.
However, we can walk through the source code through a web ex session.
Please provide your available date & time, along with your time zone you work
in.
Note: I have sent you an email with the Resources folder attached to it. But,
still I would want to discuss this issue with you over the webex session
Thanks
Original comment by rahmanre...@gmail.com
on 18 Aug 2014 at 9:49
Hi canon,
When we decompile apk with latest apk-tool, the above schemas are removed from
apk manifest itself.any reason behind this?
StaticXmlSerializerWrapper MSYS Prefix::
StaticXmlSerializerWrapper MSYS Type::CDATA
StaticXmlSerializerWrapper MSYS AttributeName::style
StaticXmlSerializerWrapper MSYS Value::@style/Font.Item
StaticXmlSerializerWrapper MSYS NameSapce::
StaticXmlSerializerWrapper MSYS Prefix::
StaticXmlSerializerWrapper MSYS Type::CDATA
StaticXmlSerializerWrapper MSYS AttributeName::font
StaticXmlSerializerWrapper MSYS Value::@string/font_light
StaticXmlSerializerWrapper MSYS NameSapce::http://oak/oak/scheme
StaticXmlSerializerWrapper MSYS Prefix::oak
StaticXmlSerializerWrapper MSYS Type::CDATA
########################################################################
--------------------- ###3###---------------------------------------------
StaticXmlSerializerWrapper MSYS pp.getText () ::null:oak.widget.TextViewWithFont
########################################################################
--------------------- ###2###---------------------------------------------
StaticXmlSerializerWrapper MSYS pp.getText () ::null:oak.widget.TextViewWithFont
StaticXmlSerializerWrapper MSYS AttributeName::id
StaticXmlSerializerWrapper MSYS Value::@id/title
Original comment by rahmanre...@gmail.com
on 22 Aug 2014 at 8:52
Original issue reported on code.google.com by
openapp...@gmail.com
on 9 Aug 2014 at 8:32