java.lang.NoClassDefFoundError

android/view/View

Samebug tips1

If you're using multiple frameworks on your project, check if this is not a problem between mismatched versions of javassist between them.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web662

  • via GitHub by yrom
    , 1 year ago
    android/view/View
  • via Stack Overflow by Pang
    , 1 year ago
    android/view/View/OnSystemUiVisibilityChangeListener
  • android/view/View
  • Stack trace

    • java.lang.NoClassDefFoundError: android/view/View at com.xtremelabs.robolectric.RobolectricTestRunner.createResourceLoader(RobolectricTestRunner.java:502) at com.xtremelabs.robolectric.RobolectricTestRunner.setupApplicationState(RobolectricTestRunner.java:357) at com.xtremelabs.robolectric.RobolectricTestRunner.internalBeforeTest(RobolectricTestRunner.java:307) at com.xtremelabs.robolectric.RobolectricTestRunner.methodBlock(RobolectricTestRunner.java:285) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.ClassNotFoundException: caught an exception while obtaining a class file for android.view.View at javassist.Loader.findClass(Loader.java:359) at com.xtremelabs.robolectric.bytecode.RobolectricClassLoader.findClass(RobolectricClassLoader.java:82) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(Unknown Source) at com.xtremelabs.robolectric.bytecode.RobolectricClassLoader.loadClass(RobolectricClassLoader.java:59) ... 18 more Caused by: java.lang.RuntimeException: problem instrumenting public void android.view.View.setContentDescription(java.lang.CharSequence) at com.xtremelabs.robolectric.bytecode.AndroidTranslator.fixMethod(AndroidTranslator.java:324) at com.xtremelabs.robolectric.bytecode.AndroidTranslator.fixMethods(AndroidTranslator.java:245) at com.xtremelabs.robolectric.bytecode.AndroidTranslator.onLoad(AndroidTranslator.java:103) at javassist.Loader.findClass(Loader.java:340) ... 22 more Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 15 at javassist.CtClassType.getClassFile2(CtClassType.java:203) at javassist.CtClassType.subtypeOf(CtClassType.java:303) at javassist.compiler.MemberResolver.compareSignature(MemberResolver.java:247) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:119) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:96) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:704) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.TypeChecker.atArrayInit(TypeChecker.java:185) at javassist.compiler.ast.ArrayInit.accept(ArrayInit.java:28) at javassist.compiler.TypeChecker.atNewArrayExpr(TypeChecker.java:161) at javassist.compiler.TypeChecker.atNewExpr(TypeChecker.java:143) at javassist.compiler.ast.NewExpr.accept(NewExpr.java:72) at javassist.compiler.JvstTypeChecker.atMethodArgs(JvstTypeChecker.java:220) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:702) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:329) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:390) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:354) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.Javac.compileStmnt(Javac.java:568) at javassist.CtBehavior.insertBefore(CtBehavior.java:705) at javassist.CtBehavior.insertBefore(CtBehavior.java:685) at com.xtremelabs.robolectric.bytecode.AndroidTranslator.fixMethod(AndroidTranslator.java:321) ... 25 more Caused by: java.io.IOException: invalid constant type: 15 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1090) at javassist.bytecode.ConstPool.read(ConstPool.java:1033) at javassist.bytecode.ConstPool.<init>(ConstPool.java:149) at javassist.bytecode.ClassFile.read(ClassFile.java:764) at javassist.bytecode.ClassFile.<init>(ClassFile.java:108) at javassist.CtClassType.getClassFile2(CtClassType.java:190) ... 57 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    4 times, 2 years ago
    Unknown user
    Once, 2 years ago
    11 times, 5 months ago
    Unknown user
    Once, 8 months ago
    27 more bugmates