Android how to export jar with resources?

前端 未结 3 1558
一个人的身影
一个人的身影 2020-12-11 07:39

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 us

相关标签:
3条回答
  • 2020-12-11 08:00

    You cannot export the Android Project to Jar with Resources. What you can do is Make First Project as Library and then Add that to another project.

    See Documentation Here shows how to Setup a Project as Library and use in another Project

    0 讨论(0)
  • 2020-12-11 08:13

    You cannot export self-contained Android Library jar at this time and announced will be available in the future SDK release.
    https://developer.android.com/guide/developing/projects/index.html#LibraryProjects

    0 讨论(0)
  • 2020-12-11 08:16

    In order to get the app working with my exported library .jar file, I had to copy everything in the resources directory "res" from the library project to the application project. Also had to merge file string.xml as well as merge the ApplicationManfiest.xml files as well. To add the project as a library through eclipse is much simpler.

    0 讨论(0)
提交回复
热议问题