Cannot debug Android app

I used to debug my app successfully with latest version of IDEA.

I have added the android-support-v7-appcompat and Google Maps v2 suuport, and now my project crashes when trying to compile:

Here is the error message:

scala: Error: android/media/RemoteControlClient$OnGetPlaybackPositionListener
java.lang.NoClassDefFoundError: android/media/RemoteControlClient$OnGetPlaybackPositionListener
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:787)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:447)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at java.lang.Class.getDeclaredFields0(Native Method)
 at java.lang.Class.privateGetDeclaredFields(Class.java:2317)
 at java.lang.Class.getDeclaredFields(Class.java:1762)
 at sbt.ClassToAPI$.structure(ClassToAPI.scala:61)
 at sbt.ClassToAPI$.x$1$lzycompute$1(ClassToAPI.scala:50)
 at sbt.ClassToAPI$.x$1$1(ClassToAPI.scala:50)
 at sbt.ClassToAPI$.instance$lzycompute$1(ClassToAPI.scala:50)
 at sbt.ClassToAPI$.sbt$ClassToAPI$$instance$1(ClassToAPI.scala:50)
 at sbt.ClassToAPI$$anonfun$5.apply(ClassToAPI.scala:51)
 at sbt.ClassToAPI$$anonfun$5.apply(ClassToAPI.scala:51)
 at xsbti.SafeLazy$Impl._t$lzycompute(SafeLazy.scala:20)
 at xsbti.SafeLazy$Impl._t(SafeLazy.scala:18)
 at xsbti.SafeLazy$Impl.get(SafeLazy.scala:24)
 at xsbti.api.ClassLike.structure(ClassLike.java:29)
 at xsbt.api.Visit.visitClass0(Visit.scala:47)
 at xsbt.api.Visit.visitClass(Visit.scala:42)
 at xsbt.api.Visit.visitDefinition(Visit.scala:35)
 at xsbt.api.Visit$$anonfun$visitAPI$2.apply(Visit.scala:18)
 at xsbt.api.Visit$$anonfun$visitAPI$2.apply(Visit.scala:18)
 at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
 at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:105)
 at xsbt.api.Visit.visitAPI(Visit.scala:18)
 at xsbt.api.APIUtil$.hasMacro(APIUtil.scala:22)
 at sbt.inc.AnalysisCallback.api(Compile.scala:125)
 at sbt.compiler.CompoundAnalysisCallback$$anonfun$api$1.apply(CompoundAnalysisCallback.scala:30)
 at sbt.compiler.CompoundAnalysisCallback$$anonfun$api$1.apply(CompoundAnalysisCallback.scala:30)
 at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
 at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
 at sbt.compiler.CompoundAnalysisCallback.api(CompoundAnalysisCallback.scala:30)
 at sbt.compiler.AggressiveCompile$$anonfun$8.sbt$compiler$AggressiveCompile$$anonfun$$readAPI$1(AggressiveCompile.scala:109)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2$$anonfun$apply$mcV$sp$1$$anonfun$apply$8.apply(AggressiveCompile.scala:114)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2$$anonfun$apply$mcV$sp$1$$anonfun$apply$8.apply(AggressiveCompile.scala:114)
 at sbt.classfile.Analyze$$anonfun$apply$8.apply(Analyze.scala:67)
 at sbt.classfile.Analyze$$anonfun$apply$8.apply(Analyze.scala:43)
 at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
 at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
 at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
 at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
 at scala.collection.mutable.HashMap.foreach(HashMap.scala:98)
 at sbt.classfile.Analyze$.apply(Analyze.scala:43)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2$$anonfun$apply$mcV$sp$1.apply(AggressiveCompile.scala:114)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2$$anonfun$apply$mcV$sp$1.apply(AggressiveCompile.scala:112)
 at scala.collection.immutable.List.foreach(List.scala:309)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2.apply$mcV$sp(AggressiveCompile.scala:112)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2.apply(AggressiveCompile.scala:112)
 at sbt.compiler.AggressiveCompile$$anonfun$8$$anonfun$compileJava$1$2.apply(AggressiveCompile.scala:112)
 at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:137)
 at sbt.compiler.AggressiveCompile$$anonfun$8.compileJava$1(AggressiveCompile.scala:111)
 at sbt.compiler.AggressiveCompile$$anonfun$8.apply(AggressiveCompile.scala:118)
 at sbt.compiler.AggressiveCompile$$anonfun$8.apply(AggressiveCompile.scala:61)
 at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
 at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
 at sbt.inc.Incremental$.cycle(Incremental.scala:46)
 at sbt.inc.Incremental$.compile(Incremental.scala:29)
 at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
 at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:128)
 at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
 at org.jetbrains.jps.incremental.scala.local.CompilerImpl.compile(CompilerImpl.scala:63)
 at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
 at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:31)
 at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: android.media.RemoteControlClient$OnGetPlaybackPositionListener
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 ... 77 more


Excerpt of my AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="myapp"
      android:versionName="40">
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>

    .....

</manifest>

Even though I have installed the Scala plugin, this module doesn't use Scala, but Java.

Thanks in advance for any tip.

David.

1 comment

I'll provide more details:

  • IDEA 12.1.4
  • Android Tools 22.2.1
  • Module SDK: Android 4.2.2 Platform, Java 1.7_0.21.
0

Please sign in to leave a comment.