机器人如何与资源出口罐子? [英] Android how to export jar with resources?
问题描述
还有一些问题需要你的帮助!
我创建建立我的自定义部件的Android项目,我想它导出为一个罐子其他项目,这样重复使用它们方便,但现在的问题是,我不能用它包含在我的自定义窗口小部件的jar资源,例如PNG图片,它得到一个空的R级的资源ID!我该如何求解带呢?
更新问题:
我怎样才能在code解析LayerDrawable XML从资产的文件夹?
there's some problems need your help!
I create an Android project for build my custom widget, and I want to export it as a jar for other project so that reuse them conveniently, but now a problem is, I can't use resources which is included in my custom widget jar, for example a png picture, it gets a null from the resource Id of class R! How can I sovle it?
Update question:
How can I parse LayerDrawable xml from assets folder in code?
推荐答案
您无法导出自包含的Android库JAR在这个时候,并宣布将在未来的SDK版本。 <一href="http://developer.android.com/intl/ja/guide/developing/projects/index.html#LibraryProjects">http://developer.android.com/intl/ja/guide/developing/projects/index.html#LibraryProjects
You cannot export self-contained Android Library jar at this time and announced will be available in the future sdk release. http://developer.android.com/intl/ja/guide/developing/projects/index.html#LibraryProjects
这篇关于机器人如何与资源出口罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!