Skip to content Skip to sidebar Skip to footer

Java.lang.illegalstateexception: Expecting .,<, Or ;, But Found Firebaseperf While Unpacking

After integrating the performance sdk in my app, gradle is printing the following warning while building the project: java.lang.IllegalStateException: Expecting .,<, or ;, but

Solution 1:

I ran into this myself with a separate project. You can modify the classpath that is passed to hugo's plugin to omit the firebase-perf module itself.

deffiltered_class_filetree = javaCompile.classpath.asFileTree.filter {
        !it.canonicalPath.contains("firebase-perf")
    }

I'm assuming this happens because Google/Firebase modified the original aspect compiler to support other functionality, thus running the normal ACJ compiler over it makes it crap out.

Solution 2:

This is an issue with the latest version of firebase performance library and aspectJ - i imagine they are doing some aspect weaving and your project also does weaving. If it's the hugo library like some other people posted i'd recommend removing it since it's a very old library and breaks incremental builds in android.

You shouldn't need hugo, since it's just for debug logging and the damage it does your builds - and it not supporting kotlin - should be reason enough to phase it out.

I - having fixed the kotlin issue with aspectJ - have a project that does need weaving and got this error hen upgrading firebase. Fixed by filtering out non-project classes from weaving like this in my build script:

String[] javaArgs = ["-showWeaveInfo",
                                 "-1.8",
                                 "-inpath", javaCompile.destinationDir.toString(),
                                 "-aspectpath", javaCompiler.classpath.asFileTree.filter {
                !it.canonicalPath.contains("transforms")
            }.asPath,
                                 "-d", javaCompile.destinationDir.toString(),
                                 "-classpath", javaCompile.classpath.asPath,
                                 "-bootclasspath", project.android.bootClasspath.join(
                    File.pathSeparator)]

AspectJ weaving worked again and I was able to use the latest firebase.

Solution 3:

I encountered the same problem and I fix with File > Invalide Caches / Restart... Hope this will be useful for you.

Solution 4:

In my case it is because of conflict plugins my project has

classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'

apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.jakewharton.hugo'compile'com.google.firebase:firebase-core:16.0.1'compile'com.google.firebase:firebase-perf:16.0.0'

I tried to reproduce it on blank project and after removing the hugo, the issue fixed, this is the previous log snippet from mine

java.lang.IllegalStateException: Expecting .,<, or ;, but found firebaseperf while unpacking <MessageType:Lcom/google/android/gms/internal/firebase-perf/zzal<TMessageType;TBuilderType;>;BuilderType:Lcom/google/android/gms/internal/firebase-perf/zzam<TMessageType;TBuilderType;>;>Ljava/lang/Object;Lcom/google/android/gms/internal/firebase-perf/zzdf;
    at org.aspectj.util.GenericSignatureParser.parseClassTypeSignature(GenericSignatureParser.java:221)
    at org.aspectj.util.GenericSignatureParser.parseFieldTypeSignature(GenericSignatureParser.java:155)
    at org.aspectj.util.GenericSignatureParser.parseFormalTypeParameter(GenericSignatureParser.java:130)
    at org.aspectj.util.GenericSignatureParser.parseAsClassSignature(GenericSignatureParser.java:51)
    at org.aspectj.weaver.UnresolvedType.forGenericTypeSignature(UnresolvedType.java:274)
    at org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWorld.java:482)

Hopefully can help fixed your issue

Post a Comment for "Java.lang.illegalstateexception: Expecting .,<, Or ;, But Found Firebaseperf While Unpacking"