question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build java due to missing class java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics

See original GitHub issue

Hi truongsinh, first I very appriciate what you’ve done with this project.

I’m trying to build and run the Java client project but i caught this error, can you guide me how to resolve this problem.

basicTest(example.appium.FlutterTest)  Time elapsed: 27.492 sec  <<< ERROR!
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
        at pro.truongsinh.appium_flutter.FlutterFinder.<init>(FlutterFinder.kt)
        at example.appium.FlutterTest.setUp(FlutterTest.java:22)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 32 more

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
shibupandacommented, Feb 2, 2020

@truongsinh faced the same. Some times above artifact blocked so let’s add this dependencies in pom.xml that will resolve the issue. I will do that.

0reactions
harih71researchcommented, Aug 3, 2020

This is my java code

dc.setCapability(“platformVersion”, “10”); dc.setCapability(“deviceName”, “803KPSL1691678”); dc.setCapability(“noReset”, true); dc.setCapability(“app”, “C:\Users\mhariharan\Downloads\myFHB\myfhb\build\app\outputs\apk\debug\app-debug.apk”); dc.setCapability(“automationName”, “Flutter”); dc.setCapability(“newCommandTimeout”, “36000”); driver = new AndroidDriver<MobileElement>(new URL(“http://127.0.0.1:4723/wd/hub”), dc);

    find = new FlutterFinder(driver);
	assertEquals(driver.executeScript("flutter:checkHealth"), "ok");
	driver.executeScript("flutter:clearTimeline");
	driver.executeScript("flutter:forceGC");
	
	find.text("Enter your mobile number").click();
	find.text("Enter your mobile number").sendKeys("8939123367");
Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics ...
Adding all project files to the jar fixed the problem for me. I added the following line to my build.gradle jar { manifest...
Read more >
Cannot build java due to missing class java.lang ... - GitHub
There is something wrong with the finder project. I cannot run the java appium client project. The error now showing : java.lang.NoClassDefFoundError: kotlinx/ ......
Read more >
How to Resolve the NoClassDefFoundError in Java - Rollbar
NoClassDefFoundError is a Java error that occurs when the JVM is unable to find a class at runtime which was available at compile-time....
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
A simple example of NoClassDefFoundError is class belongs to a missing JAR file or JAR was not added into classpath or sometimes jar's...
Read more >
Not able to run jar file - Kotlin Discussions
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics at MainfileKt.main(Mainfile.kt) Caused by: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found