0

Is there a way to create a custom Android view with all its necessary stuff (source code, layout file, defined attributes, ...) and pack it as a JAR file?

Ali Behzadian Nejad
  • 8,804
  • 8
  • 56
  • 106
  • 1
    no you cannot package resources into jars. you can package pure a java classes that do not refer to resources as jar. http://stackoverflow.com/questions/17290868/is-it-possible-to-add-a-jar-file-of-a-library-project-and-use-its-resources-in-a/17291460#17291460 – Raghunandan Jul 20 '13 at 06:05
  • you can make one project library project and reference the same in others like google play services library. – Raghunandan Jul 20 '13 at 06:08
  • http://stackoverflow.com/questions/17565865/android-use-activity-in-jar-noclassdeffounderror#comment25556528_17565865. check this. might help. – Raghunandan Jul 20 '13 at 06:18

1 Answers1

2

I think its not possible to package resource file in Jar. Instead you can make your view project as a library project and refer it from your actual project.

arjoan
  • 1,849
  • 2
  • 20
  • 39