Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conflict with Huawei HMS plugin in android with gradle 7.0.0

I'm getting this error with Gradle 7.0 while it was working fine for 6.8.3

agcp-gradle-7-error

AGCPlugin

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':app:processDebugAGCPlugin' (type 'AGCPluginTask').
    • Type 'AGCPluginTask' property 'randomEncryptComponent' of type boolean shouldn't be annotated with @Optional.

      Reason: Properties of primitive type cannot be optional.

      Possible solutions:

      1. Remove the @Optional annotation.
      2. Use the java.lang.Boolean type instead.

      Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#cannot_use_optional_on_primitive_types for more details about this problem.

like image 313
Moataz Avatar asked Apr 19 '21 12:04

Moataz


2 Answers

I no longer get any errors with:

classpath 'com.huawei.agconnect:agcp:1.5.2.300'

and

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
like image 156
jayeffkay Avatar answered Oct 20 '22 18:10

jayeffkay


Currently Gradle 7.0 is not supported. As I hear, it will be supported at the end of June.

like image 32
mohax Avatar answered Oct 20 '22 18:10

mohax