Reputation: 562
Hi I had created an android library project. Now I want to distribute my library to others without showing my code. I tried it with converting to jar. But its not working because I used resources in the library project. So is there any method to convert library project with resources to jar file ?? or How can I hide my java code in the project ??? please help me with some examples, thanks in advance :)
Upvotes: 1
Views: 620
Reputation: 294
You can convert that library file to jar file by running some commands in command prompt :
jar -cvf jar-file input-file(s)
jar-file is the file name which will be created so it should have extension .jar For example
jar -cvf convertedjar.jar myppackagename
Please refer this link:
http://docs.oracle.com/javase/tutorial/deployment/jar/build.html
Upvotes: 1
Reputation: 14808
First create a jar from your project and then create a new project and add your resources to that project also put your jar in libs folder of new project. leave the manifest file as it is.
You can see the example in google_play_service_lib which is in extra folder in your sdk.
Upvotes: 0