jberkel / android-plugin

An sbt plugin for Android development in Scala
https://groups.google.com/forum/#!forum/scala-on-android
Other
476 stars 113 forks source link

Class Not Found Error when using intent Receiver #7

Closed lolsborn closed 14 years ago

lolsborn commented 14 years ago

When I build everything with Ant and http://code.google.com/p/scalaforandroid/ everything works fine, but when I build my project with sbt/android-plugin Android throws an exception on boot when looking for my BroadcastReceiver subclass. Launching the app through the main activity still works fine, just this broadcast receiver class is not found.

My BroadcastReceiver is simple:

class CoreReceiver extends BroadcastReceiver {
  val BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED"

  override def onReceive(context: Context, intent: Intent) {
     if (intent.getAction().equals(BOOT_COMPLETED)) {
       // Do something
    }
  }
}

and I have the following in my AndroidManifest:

  <receiver android:name="CoreReceiver">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
  </receiver>
jberkel commented 14 years ago

closed in 1118d587a7a5af03a3f4