To share some code between projects I created a new eclipse project marking it as a library project, following google's directions[1].
Everything compiles fine, but when I run the app it silently dies when it is unable to find the service. Logcat shows the following:
WARN/ActivityManager(52): Unable to start service Intent { cmp=com.iis.agatha/com.iis.common.services.FenceSyncService }: not found
As per the instructions[1] I have the library services referenced within the mai开发者_StackOverflow中文版n project's manifest file as well as the library project. I have tried refactoring the library project namespace to com.iis.agatha to match that main project without any luck.
<!-- SERVICES: Main project -->
<service android:name="com.iis.common.services.GeoLocationService" />
<service android:name="com.iis.common.services.FenceSyncService" />
<!-- SERVICES: Library project -->
<service android:name="com.iis.common.services.GeoLocationService" />
<service android:name="com.iis.common.services.FenceSyncService" />
Any ideas?
- http://developer.android.com/guide/developing/projects/projects-eclipse.html
Some where when running into some other problems I foolishly moved the service xml tags up out of the <application />
and into the <manifest>
. After moving them back all works fine.
精彩评论