GooglePlayServicesComponents icon indicating copy to clipboard operation
GooglePlayServicesComponents copied to clipboard

Cannot run dotnet cake build.cake successfully

Open Picao84 opened this issue 1 year ago • 7 comments

Hello,

I've been trying to build this project locally but running dotnet cake build.cake always ends up in failure as it cannot download any of the jar sources! Any idea what might be wrong?

Thanks, Tiago

Picao84 avatar Mar 22 '24 13:03 Picao84

Hello,

I've been trying to build this project locally but running dotnet cake build.cake always ends up in failure as it cannot download any of the jar sources! Any idea what might be wrong?

Nothing. Does it stop? Basically detecting whether maven artifact exist is 200 vs 404 probing.

dotnet cake calls dotnet cake -t=ci and you should find nugets in ./output/ folder. Do not interrupt it until it finishes.

Did you add new artifacts? if yes those might cause errors and exits/stops later.

moljac avatar Mar 25 '24 10:03 moljac

I did not add new artifacts. I managed to get further now and I get an error from Gradle.

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

I guess there might be issues with JAVA and Gradle versions? Which do you recommend? Thanks!

Picao84 avatar Mar 25 '24 16:03 Picao84

I managed to solve it by specifying JAVA version 11 location on Gradle.Settings file!

Picao84 avatar Mar 25 '24 17:03 Picao84

Oh, oh.. now on the libs task I get: "error MSB4057: The target "_GetRestoreSettingsPerFramework" does not e xist in the project. [TargetFramework=MonoAndroid12.0]" on every project...

Picao84 avatar Mar 25 '24 17:03 Picao84

I did not add new artifacts. I managed to get further now and I get an error from Gradle.

OK. I asked/stated because I thought you might want to bind something new.

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

I guess there might be issues with JAVA and Gradle versions? Which do you recommend? Thanks!

Most likely. Which java do you have installed?

 gradle --version
------------------------------------------------------------
Gradle 8.6
------------------------------------------------------------

Build time:   2024-02-02 16:47:16 UTC
Revision:     d55c486870a0dc6f6278f53d21381396d0741c6e

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          11.0.16.1 (Microsoft 11.0.16.1+1-LTS)
OS:           Mac OS X 14.4 aarch64

I see AX is using 6.3 and GPS-FB-MLKit repo (this one) uses 6.1.1.

moljac avatar Mar 25 '24 17:03 moljac

So I was able to run all tasks now until libs fails with "The target _GetRestoreSettingsPerFramework does not exist in the project" on every single project. Any idea why? Thanks in advance!

Picao84 avatar Mar 28 '24 15:03 Picao84

this might give you few hints

https://github.com/novotnyllc/MSBuildSdkExtras/issues/85

moljac avatar Apr 25 '24 20:04 moljac