Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appear bug. #164

Open
zhonghanwen opened this issue Nov 27, 2018 · 9 comments
Open

appear bug. #164

zhonghanwen opened this issue Nov 27, 2018 · 9 comments

Comments

@zhonghanwen
Copy link

ABORT
java.lang.IllegalStateException: Expecting .,<, or ;, but found authapi while unpacking <R::Lcom/google/android/gms/common/api/Result;>Lcom/google/android/gms/common/api/internal/BaseImplementation$ApiMethodImpl<TR;Lcom/google/android/gms/internal/auth-api/zzr;>;
	at org.aspectj.util.GenericSignatureParser.parseClassTypeSignature(GenericSignatureParser.java:221)
	at org.aspectj.util.GenericSignatureParser.parseFieldTypeSignature(GenericSignatureParser.java:155)
	at org.aspectj.util.GenericSignatureParser.parseTypeArgument(GenericSignatureParser.java:251)
	at org.aspectj.util.GenericSignatureParser.maybeParseTypeArguments(GenericSignatureParser.java:259)
	at org.aspectj.util.GenericSignatureParser.parseClassTypeSignature(GenericSignatureParser.java:204)
	at org.aspectj.util.GenericSignatureParser.parseAsClassSignature(GenericSignatureParser.java:56)
	at org.aspectj.weaver.UnresolvedType.forGenericTypeSignature(UnresolvedType.java:274)
	at org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWorld.java:482)
	at org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWorld.java:456)
	at org.aspectj.weaver.bcel.BcelWeaver.addAspectsFromJarFile(BcelWeaver.java:263)
	at org.aspectj.weaver.bcel.BcelWeaver.addLibraryJarFile(BcelWeaver.java:236)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:874)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:249)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
	at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
	at org.aspectj.tools.ajc.Main.run(Main.java:371)
	at org.aspectj.tools.ajc.Main$run.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
	at hugo.weaving.plugin.HugoPlugin$_apply_closure2_closure3.doCall(HugoPlugin.groovy:55)
	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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at groovy.lang.Closure.call(Closure.java:414)
	at groovy.lang.Closure.call(Closure.java:430)
	at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:718)
	at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:691)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:745)
@fishyer
Copy link

fishyer commented Jan 10, 2019

I'm having the same problem

@ArslanKathia
Copy link

i'm having the same problem

@letuananh035
Copy link

You should use play-services-auth version 15.0.0

@konned
Copy link

konned commented Apr 10, 2019

I found the way how to bypass this error. The problem is inside your plugin.
Instead of using your plugin use this one: https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx

You have too add resolutionStrategy when it comes to aspect version.
Your build.gradle root:

repositories {
        configurations.all {
            resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                def requested = details.requested
                if (requested.group == 'org.aspectj:aspectjtools') {
                    details.useVersion '1.9.2'
                }
                if (requested.group == 'org.aspectj:aspectjrt') {
                    details.useVersion '1.9.2'
                }

Now everything is working with play-services-auth:15.0.0
I know this is not a fix but maybe it will help you to come across some idea.
Hope this helps. I am still investigating what is the cause of that error.

@mezentsev
Copy link

mezentsev commented Apr 11, 2019

Filter your classpath from excess dependencies. It helps me:

val javaCompiler = variant.javaCompiler as AbstractCompile
javaCompiler.doLast {
   val args = arrayOf(
         "-showWeaveInfo",
         "-1.5",
         "-inpath", javaCompiler.destinationDir.toString(),
         "-aspectpath", javaCompiler.classpath.asFileTree.filter {
                  !it.canonicalPath.contains("transforms")
         }.asPath,
         "-d", javaCompiler.destinationDir.toString(),
         "-classpath", javaCompiler.classpath.asPath,
         "-bootclasspath", (project.extensions.getByName("android") as BaseExtension).bootClasspath.joinToString(File.pathSeparator)
   )

   val handler = MessageHandler(true)
   Main().run(args, handler)
}

@peihua8858
Copy link

I'm having the same problem

@ddekanski
Copy link

@JakeWharton any news on this? This bug means that Hugo won't work with the latest play-services-auth library.

@Kolyall
Copy link

Kolyall commented Jun 8, 2020

For aspectpath is enough just path to libs of plugin for example in case of the plugin:


JavaCompile javaCompiler
    if (variant.hasProperty('javaCompileProvider')) {
        // Android 3.3.0+
        javaCompiler = variant.javaCompileProvider.get()
    } else {
        javaCompiler = variant.javaCompile
    }
javaCompiler.doLast {
def aspectPath =  javaCompile.classpath.asFileTree.filter {
            it.canonicalPath.contains("hugo-runtime") ||  it.canonicalPath.contains("hugo-annotations")
        }.asPath
   val args = [
         "-showWeaveInfo",
         "-1.8",
         "-inpath", javaCompiler.destinationDir.toString(),
         "-aspectpath", aspectPath,
         "-d", javaCompiler.destinationDir.toString(),
         "-classpath", javaCompiler.classpath.asPath,
         "-bootclasspath", project.android.bootClasspath.join(File.pathSeparator)
   ]

   val handler = MessageHandler(true)
   Main().run(args, handler)
}

@fdh19979
Copy link

fdh19979 commented Mar 17, 2021

this work for me , exclude all play-servcie.jar

JavaCompile javaCompile = variant.javaCompile
   javaCompile.doLast {
       def aspectPath = javaCompile.classpath.asFileTree.filter { !(it.canonicalPath.contains("play-services") && !it.canonicalPath.contains("jetified-play-services")) }.asPath;
       String[] args = [
               "-showWeaveInfo",
               "-1.8",
               "-inpath", javaCompile.destinationDir.toString(),
               "-aspectpath", aspectPath,
               "-d", javaCompile.destinationDir.toString(),
               "-classpath", aspectPath,
               "-bootclasspath", project.android.bootClasspath.join(File.pathSeparator)
       ]
       log.debug "aspectj args: " + Arrays.toString(args)
       MessageHandler handler = new MessageHandler(true);
       new Main().run(args, handler)
       for (IMessage message : handler.getMessages(null, true)) {
           switch (message.getKind()) {
               case IMessage.ABORT:
               case IMessage.ERROR:
               case IMessage.FAIL:
                   log.error message.message, message.thrown
                   break
               case IMessage.WARNING:
                   log.warn message.message, message.thrown
                   break
               case IMessage.INFO:
                   log.info message.message, message.thrown
                   break
               case IMessage.DEBUG:
                   log.debug message.message, message.thrown
                   break
           }
       }
   }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants