I have encountered the NoClassDefFoundError when trying to create a new Intent to start a Service. I have checked several suggested solutions such as including libraries in the /libs path, I believe that I have these set up correctly. I have included my manifest and source below. Any help would be really appreciated.
Here is a screen capture of my file structure inside Eclipse

Here is my Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ajinex.easysave"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".CouponsActivity"
android:screenOrientation="portrait"
android:launchMode="singleInstance"
android:label="@string/title_activity_coupons" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- service -->
<service android:enabled="true" android:name=".LocationCheckService" >
</service>
</application>
Here is my calling code from the MainActivity:
Intent LocationCheck = new Intent(this, LocationCheckService.class);
this.startService(LocationCheck);
Here is my LocationCheckService.class
public class LocationCheckService extends Service {
public class LocalBinder extends Binder {
LocationCheckService getService() {
return LocationCheckService.this;
}
}
public final IBinder mBinder = new LocalBinder();
@Override
public IBinder onBind(Intent intent) {
return mBinder;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if(checkNetworkRechability()){
Toast.makeText(this, "EasySave Service Started", Toast.LENGTH_LONG).show();
getSysLocation();
}
return START_STICKY;
}
@Override
public void onCreate() {
}
@Override
public void onDestroy() {
}
}
Here is some LogCat output relating to the issue:
07-16 00:09:36.712: I/AndroidRuntime(312): NOTE: attach of thread 'Binder Thread #3' failed
07-16 00:09:37.702: W/ActivityManager(59): Unable to start service Intent { act=com.ajinex.easysave.location.LocationCheckService }: not found
07-16 00:09:38.162: I/ActivityManager(59): Displayed activity com.ajinex.easysave/.MainActivity: 1568 ms (total 1568 ms)
Based on the error message (com.ajinex.easysave.location.LocationCheckService) and the package name (com.ajinex.easysave) you need to declare the service as .location.LocationCheckService in the manifest file.