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.

java.lang.ClassNotFoundException when plugin added to a project with JavaVersion.VERSION_1_8

See original GitHub issue

Hi! I encountered the following issue with projects with java 8 support. Do the following steps:

  • Start new project (File->New->New Project)
  • Add compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } to the android { } section of the app’s module
  • Run the app, check it works
  • Clean
  • Add classpath 'com.archinamon:android-gradle-aspectj:3.2.0' to the top level build.gradle and apply plugin: 'com.archinamon.aspectj' to the app level ** No aspects where added at all, nor annotated, no .aj either, just plugin
  • Run the app (you might need to run clean-build 1 or 2 times)

Result. App crashes with an exception on start:

Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.demo.myapplication.MainActivity” on path: DexPathList[[zip file “/data/app/com.demo.myapplication-1/base.apk”],nativeLibraryDirectories=[/data/app/com.demo.myapplication-1/lib/x86, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass( at java.lang.ClassLoader.loadClass(

Console output: `> Task :app:transformClassesWithStackFramesFixerForDebug :app:transformClassesWithStackFramesFixerForDebug spend 741ms

Task :app:transformClassesWithDesugarForDebug :app:transformClassesWithDesugarForDebug spend 2073ms

Task :app:transformClassesWithAspectjForDebug ---------- Starting augmentation with AspectJ transformer ---------- Ajc classpath doesn’t has needed runtime environment ---------- Exit AspectJ transformer w/o processing ---------- :app:transformClassesWithAspectjForDebug spend 12ms

Task :app:transformClassesWithDexBuilderForDebug :app:transformClassesWithDexBuilderForDebug spend 107ms `

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

Archinamoncommented, Jan 9, 2018

Hi! Thanks for report! This issue occurs due to plugin incompatibility with java 8. Will be fixed soon in 3.3.0 😃

ab-hellycommented, Mar 13, 2018

Is there any ETA on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve ClassNotFoundException? - java
When you get a ClassNotFoundException, it means the JVM has traversed the entire classpath and not found the class you've attempted to reference....
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
1. A simple example of NoClassDefFoundError is class belongs to a missing JAR file or JAR was not added into classpath or sometimes...
Read more >
Use Java 8 language features and APIs - Android Developers
Discover the Java 8 language features you can use, how to properly configure your project to use them, and any known issues you...
Read more >
LineIconMarkerProvider (classloader=PluginClassLoader(plugin=PluginDescriptor(name=Gorm, id=com.aiwan.gorm, descriptorPath=plugin.xml, ...
Read more >
Toolchains for JVM projects - Gradle User Manual
Additionally, you may want to build a project using a Java version that is not ... Toolchain support is available in the Java...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found