Android custom Library
I have created a custom library that contains a UI that is to di开发者_JS百科splay data being read in from an external device. I have successfully created and applied the library to the project I need it in.
My main issue is I cant seem to use it at all. Ive tried to create an instance of the class file and this is failure. I have functions inside that class file I would like to use, but am unable since a simple declaration of a new class throws an exception for me.
Basically I dont want you to fix my problem, I want to see how this is done correctly. Ive searched the Internet for days and can not even find examples on how to do this.
I thought it would work just like creating an instance of any other class, but it does not. Thank you.
It sounds like you need to do some Eclipse project management.
The custom library including the UI and code that accesses the data source should be in an Android library project (see: "setting up a library project"). The Application which will use this functionality needs to include this library project (see: "referencing a library project").
See the Android docs about Managing Projects from Eclipse.
精彩评论