1

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>
2
  • That -2 in the end is added automatically don't worry because that's not the problem. Commented Oct 3, 2014 at 19:14
  • now i'm more worried than i was hehe Commented Oct 3, 2014 at 19:15

2 Answers 2

2

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!

Sign up to request clarification or add additional context in comments.

Comments

0

It's no that.

  1. Make sure your package-name is correct in anywhere (the java files, the xml files, AndroidManifest files...).
  2. Right click on the project; goto Build Path --> Configure Build Path --> Java Build Path --> Order and Export. Then uncheck Android Dependencies and check all third-party .jar, if you have any.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.