RxDNSSD icon indicating copy to clipboard operation
RxDNSSD copied to clipboard

when i build apk, I get the problem( {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable")

Open shixiongsun opened this issue 5 years ago • 8 comments

AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSDEmbedded.java","position":{"startLine":59,"endLine":60}}]}

shixiongsun avatar May 29 '19 08:05 shixiongsun

Hi, looks similar to #71 try to add

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

andriydruk avatar May 29 '19 09:05 andriydruk

I had add this but no use

shixiongsun avatar May 29 '19 09:05 shixiongsun

Do you have an issue when you compile this project?

andriydruk avatar May 29 '19 09:05 andriydruk

I get this when build this project to Android devices

`AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":474,"endLine":475}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":430,"endLine":431}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":480,"endLine":481}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":421,"endLine":422}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":485,"endLine":486}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":247,"endLine":248}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":238,"endLine":239}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":160,"endLine":161}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":147,"endLine":148}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":155,"endLine":156}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSDEmbedded.java","position":{"startLine":59,"endLine":60}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSDEmbedded.java","position":{"startLine":103,"endLine":104}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":229,"endLine":230}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":323,"endLine":324}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":328,"endLine":329}}]} AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"F:\svnstarEt\starEt\DNSSD.java","position":{"startLine":414,"endLine":415}}]} :newleanote-android-master:transformClassesWithPreJackPackagedLibrariesForDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':newleanote-android-master:transformClassesWithPreJackPackagedLibrariesForDebug'.

com.android.build.api.transform.TransformException: com.android.builder.core.JackToolchain$ToolchainException: Jack compilation exception

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org `

shixiongsun avatar May 29 '19 09:05 shixiongsun

This is your project newleanote-android? Could you check this repo?

andriydruk avatar May 29 '19 09:05 andriydruk

yes

shixiongsun avatar May 29 '19 09:05 shixiongsun

What version of Android Studio do you use?

andriydruk avatar May 29 '19 09:05 andriydruk

3.1.3

shixiongsun avatar May 29 '19 09:05 shixiongsun