shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.32k stars 140 forks source link

Could not open cp_proj generic class cache for build file #2435

Closed eseidel closed 3 weeks ago

eseidel commented 2 months ago

@Moinuddin9777 writes:

For me this very issue came up after migrating an old project, I had no implementation of shorebird in that project.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not open cp_proj generic class cache for build file '/Users/username/projects/project_name/android/app/build.gradle' (/Users/username/.gradle/caches/7.3.3/scripts/euzwbzznt4f7dpdx1y8ys6uaz).
   > BUG! exception in phase 'conversion' in source unit '_BuildScript_' class org.codehaus.groovy.ast.expr.TupleExpression cannot be cast to class org.codehaus.groovy.ast.expr.ArgumentListExpression (org.codehaus.groovy.ast.expr.TupleExpression and org.codehaus.groovy.ast.expr.ArgumentListExpression are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @6767c1fc)

What all I tried:

Originally posted by @Moinuddin9777 in https://github.com/shorebirdtech/shorebird/issues/1393#issuecomment-2298068855

eseidel commented 2 months ago

@Moinuddin9777 We would love to help.

My guess is that this is https://stackoverflow.com/questions/32513740/gradle-build-failure-could-not-open-proj-class-cache-for-build-file

And the probably shorebird is finding the wrong java binary?

You can test this theory by comparing the output of flutter doctor -v and shorebird doctor -v and making sure they find the same java

When you run flutter build apk your App builds correctly, but then it fails when built with shorebird release android correct?

eseidel commented 3 weeks ago

Would love to help, but would need more information. Please don't hesitate to reach out if we can be of help! https://discord.gg/shorebird reaches us live every day.