开发者

Compile Android appwidget

开发者 https://www.devze.com 2023-01-29 21:39 出处:网络
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 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

精彩评论

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