Quantcast
Channel: Adobe Community : Unanswered Discussions - AIR Development
Viewing all articles
Browse latest Browse all 2010

Android R.* access and the case of the missing styleable

$
0
0

Hi,

 

I'm trying to use appcompat-v7 in my ANE and access it via the R.* mechanism.

 

The packaging step of the ANE works fine.

 

 

However, when building the final .apk using this ANE, the styleable elements disappear. The other resources (such as drawables, etc) are present just fine in the output.

 

The artifacts I'm using are classes.jar and the res folder from inside the .aar for appcompat-v7: \android-sdk\extras\android\m2repository\com\android\support\appcompa t-v7\19.0.1\appcompat-v7-19.0.1.aar

 

 

The end result is that the generated apk contains and R file for this library, and an R.styleable, but it's empty (by comparison in a properly built non-air android app this R.styleable would contain quite a few different fields). The other R. classes seem to be properly populated with a merge of the resource ids - R.string, R.layout, etc.

 

Here's (a trimmed down version) of the platform.xml I'm using when packaging the ANE:

 

<platform xmlns="http://ns.adobe.com/air/extension/4.0">

    <packagedDependencies>

        <packagedDependency>support-v4-19.0.1.jar</packagedDependency>

        <packagedDependency>android.support.v7.appcompat-classes.jar</package dDependency>

    </packagedDependencies>

    <packagedResources>

        <packagedResource>

            <packageName>android.support.v7.appcompat</packageName>

            <folderName>android.support.v7.appcompat-res</folderName>

        </packagedResource>

    </packagedResources>

</platform>

 

 

Here are the errors I'm seeing during install time:

 

D/dalvikvm﹕ DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.ActionBarLayout

D/dalvikvm﹕ DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.ActionBarWindow

D/dalvikvm﹕ DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme          

...the list continues here

 

and at runtime:

 

java.lang.NoSuchFieldError: android.support.v7.appcompat.R$styleable.ActionBarWindow

 

 

 

So the question is: are styleable attributes supported in air native extensions?

 

 

 

Thanks,

Radu


Viewing all articles
Browse latest Browse all 2010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>