开发者

Compile Android appwidget

i have 2 android projects in eclipse, one is the main application, the other one is a widget for the home screen. I'd like to open the main application when the user clicks the widget. However, when i create an Intent with an Activity from the main application, i get a "NoClassDefFoundError" during runtime.

The Widget compiles fine, as i've added the main application to 开发者_开发技巧the build path. Does anyone konw how i can compile an android widget so i can reference classes of the main app?

thanks!


You could implement a BroadcastReciever in your Application that has the Activity you wish to launch and then just launch it from within that Applicaiton

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜