i'm having this problem with my receiver...
10-03 15:38:34.238: E/AndroidRuntime(32219): FATAL EXCEPTION: main
10-03 15:38:34.238: E/AndroidRuntime(32219): java.lang.RuntimeException: Unable to instantiate receiver com.rafael.acordenoponto.MonitoraGPS: java.lang.ClassNotFoundException: Didn't find class "com.rafael.acordenoponto.MonitoraGPS" on path: /data/app/com.rafael.acordenoponto-2.apk
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2285)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.app.ActivityThread.access$1600(ActivityThread.java:137)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.os.Handler.dispatchMessage(Handler.java:99)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.os.Looper.loop(Looper.java:137)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.app.ActivityThread.main(ActivityThread.java:5031)
10-03 15:38:34.238: E/AndroidRuntime(32219): at java.lang.reflect.Method.invokeNative(Native Method)
10-03 15:38:34.238: E/AndroidRuntime(32219): at java.lang.reflect.Method.invoke(Method.java:511)
10-03 15:38:34.238: E/AndroidRuntime(32219): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
10-03 15:38:34.238: E/AndroidRuntime(32219): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
10-03 15:38:34.238: E/AndroidRuntime(32219): at dalvik.system.NativeStart.main(Native Method)
10-03 15:38:34.238: E/AndroidRuntime(32219): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.rafael.acordenoponto.MonitoraGPS" on path: /data/app/com.rafael.acordenoponto-2.apk
10-03 15:38:34.238: E/AndroidRuntime(32219): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
10-03 15:38:34.238: E/AndroidRuntime(32219): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-03 15:38:34.238: E/AndroidRuntime(32219): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-03 15:38:34.238: E/AndroidRuntime(32219): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2280)
10-03 15:38:34.238: E/AndroidRuntime(32219): ... 10 more
had alread cleaned my project and rebuilt the path... I think that the problem is in this part "/data/app/com.rafael.acordenoponto-2.apk", but i don't know how to solve... i think the problem is there because my apk does not have that "-2" in the end... anyone know how to solve?
Here's the manifest:
<receiver android:name=".MonitoraGPS">
<intent-filter >
<action android:name="MONITORAR"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
It's no that.
solved!
the problem happened because .MonitoraGPS was in a different package... so i just added the package name before .MonitoraGPS in the manifest and it worked!