LOLs
LOLs

Reputation: 13

call jar file method in Activity class Android

I have a jar file which want to use in my android app. I know how to run jar file in terminal. I also know that I should add those jar files to android projects in lib folder. I don't know how to call Main method of specific jar file in Activity class. Also there are many jar files that are interdepended.

Upvotes: 0

Views: 255

Answers (1)

NRUSINGHA MOHARANA
NRUSINGHA MOHARANA

Reputation: 1559

Library has to be added in app level build.gradle file after stored in lib folder. For instance: implementation files('libs/print.jar'). Then you can import the class inside this jar file like any other class and call public or static methods. Correct me if I am wrong, please.

Upvotes: 1

Related Questions