Oh, wild. I changed the API level dropdown box at the top of the page to 16, thinking it'd make any 16+ methods go away, and it didn't. Thanks!
On 12/23/2014 11:15 AM, Perry Nguyen wrote: > View(context, attrs, attrRes, styleRes) is api21+ > > On Tue Dec 23 2014 at 9:13:04 AM Nolan Darilek <no...@thewordnerd.info> > wrote: > >> Getting this error in an app I built for a client: >> >> STACK_TRACE=java.lang.NoSuchMethodError: android.widget.EditText.<init> >> at org.nbp.editor.ui.MyEditText.<init>(ui.scala:103) >> at org.nbp.editor.ui.MyEditText.<init>(ui.scala:116) >> >> The lines in question are constructors creating a custom EditText widget: >> >> class MyEditText(context:Context, attributes:AttributeSet, >> defStyleAttr:Int, defStyleRes:Int) extends EditText(context, attributes, >> defStyleAttr, defStyleRes) { // 103 >> >> setMovementMethod(new MyMovementMethod()) >> >> addTextChangedListener(new TextFormatter) >> >> def this(context:Context, attributes:AttributeSet, defStyleAttr:Int) = >> this(context, attributes, defStyleAttr, 0) >> >> def this(context:Context, attributes:AttributeSet) = >> this(context, attributes, 0, 0) >> >> def this(context:Context) = >> this(context, null, 0, 0) // 116 >> ... >> } >> >> I did much of my testing under Scala 2.11.4 on Android 5.0.1. I also did >> a bit under 2.11.2 and Android 4.4, though I could never get Intel's >> accelerator working under Windows/4.4 while 5.0 works very well. Since >> I'm not explicitly using 5.0+ features, I thought this would be fine. >> >> I did do a Scala bump from 2.11.2 to 2.11.4. 2.11.2 was working fine on >> the Android emulator under 4.4.2. I'm trying again in the emulator, and >> will rebuild against 2.11.4 a bit later to see if something happened >> between the two minor versions that might break Android compatibility. >> But it's odd that instantiating a custom Android widget fails like this, >> and I'm wondering if anyone knows a solution? >> >> Thanks. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "scala-on-android" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to scala-on-android+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> -- You received this message because you are subscribed to the Google Groups "scala-on-android" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-on-android+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.