简体   繁体   中英

How to import and use another package

I have my main project and I have created another on the side. The new one simply listens for a button click and then runs methods to update a users twitter status.

What I am unable to do at the moment is use this in my original project. I could copy the code into every .java file but that would be excessive.

What would be a better way to accomplish this and activate the onclick listener.

If the library is provided as a jar file, then place it in the /libs folder in your project.

If the library is itself an android project, read up on Android Library Projects

If the problem is simply "How do you import a package?", Read this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM