PARSE ERROR | How to fix?

As I was building the Chromecast extension I’m making, I received this error:

dexExtension:
     [java]
     [java] PARSE ERROR:
     [java] unknown tag byte: 13
     [java] ...while preparsing cst 0004 at offset 0000003e
     [java] ...while parsing module-info.class
     [java] 1 error; aborting

Is there anyway to fix this? Is it with a library that was imported? I’m assuming so.

show all error

That is all error. It built now after changing a import syntax, I’m going to test.

@Andres_Cotes @ewpatton Now I’m getting Error from companion: invoke: no method named 'functionName' in class java.lang.Boolean

Reset Connection to Companion before you import/update an extension.
Reconnect afterwards.

1 Like

I’m still getting the error after restarting it. From what I see, there’s not any errors in the terminal either while it was building.

1 Like

What about the error you first posted? If you’re having problems with dex, then what’s likely happening is the dynamic linking step on the device is failing and then you end up with an unresolvable method. Can you post the complete stack trace from adb logcat?

1 Like

My first error wasn’t an issue with my device though. I imported my lib with a * at the end of the import, and it tried importing that class which wasn’t needed so I had to make it specific. Now it’s not letting me do anything with the extension because of my second issue.

I’m going to assume since there’s no solutions, there’s nothing that can fix this issue.

I asked you to post the stack trace from adb logcat. There’s not much we can do to help if you don’t provide the information that would allow us to help.

1 Like

I’ll get the log tomorrow. It’s now 11 PM and I’ve spent almost all day working with Firebase :sweat:

I got same error while making exoplayer extension

this is my error
dexExtension:
[java]
[java] PARSE ERROR:
[java] InvokeDynamic not supported
[java] …while preparsing cst 0004 at offset 00000019
[java] …while parsing com/google/android/exoplayer2/AudioFocusManager$AudioFocusListener.class
[java] 1 error; aborting
What Should I Do To Fix It?

This means that your library is using Java 8 features. Not all Java 8 features are supported on Android. You could try running the jar file through d8 to have it rewrite to something that dx.jar can understand. Generally, we do not recommend using Java 8 features in our code base, nor many Java 7 features, such as automated resource management, since it only works on newer versions of Android.

1 Like

Thanks :blush: for detailed explanation