hms-react-native-plugin icon indicating copy to clipboard operation
hms-react-native-plugin copied to clipboard

Updated to Gradle 8.6, failed to build with HMS for release

Open A3859 opened this issue 1 year ago • 4 comments

Description recently updated gradle to 8.6, running on emulator works fine. but fail when try to gradlew app:assembleRelease, attached with error below. Please help.

  • What went wrong: Some problems were found with the configuration of task ':app:bundleReleaseJsAndAssets' (type 'Exec').

    • Gradle detected a problem with the following location: 'F:\WORK\xxx\xxxx'.

      Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':@hmscore_react-native-hms-analytics:compileReleaseAidl' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hmscore_react-native-hms-analytics:compileReleaseAidl' as an input of ':app:bundleReleaseJsAndAssets'.
      2. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseAidl' from ':app:bundleReleaseJsAndAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseAidl' from ':app:bundleReleaseJsAndAssets' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

    • Gradle detected a problem with the following location: 'F:\WORK\xxx\xxx'.

      Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':@hmscore_react-native-hms-analytics:compileReleaseJavaWithJavac' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hmscore_react-native-hms-analytics:compileReleaseJavaWithJavac' as an input of ':app:bundleReleaseJsAndAssets'.
      2. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseJavaWithJavac' from ':app:bundleReleaseJsAndAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseJavaWithJavac' from ':app:bundleReleaseJsAndAssets' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

    • Gradle detected a problem with the following location: 'F:\WORK\xxx\xxx'.

      Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':@hmscore_react-native-hms-analytics:compileReleaseRenderscript' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hmscore_react-native-hms-analytics:compileReleaseRenderscript' as an input of ':app:bundleReleaseJsAndAssets'.
      2. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseRenderscript' from ':app:bundleReleaseJsAndAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:compileReleaseRenderscript' from ':app:bundleReleaseJsAndAssets' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

    • Gradle detected a problem with the following location: 'F:\WORK\xxx\xxx'.

      Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':@hmscore_react-native-hms-analytics:packageReleaseResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hmscore_react-native-hms-analytics:packageReleaseResources' as an input of ':app:bundleReleaseJsAndAssets'.
      2. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:packageReleaseResources' from ':app:bundleReleaseJsAndAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:packageReleaseResources' from ':app:bundleReleaseJsAndAssets' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

    • Gradle detected a problem with the following location: 'F:\WORK\xxx\xxx'.

      Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':@hmscore_react-native-hms-analytics:generateReleaseResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hmscore_react-native-hms-analytics:generateReleaseResValues' as an input of ':app:bundleReleaseJsAndAssets'.
      2. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:generateReleaseResValues' from ':app:bundleReleaseJsAndAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hmscore_react-native-hms-analytics:generateReleaseResValues' from ':app:bundleReleaseJsAndAssets' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

Expected behavior compile release correctly

Current behavior failed to compile ext { buildToolsVersion = "30.0.2" minSdkVersion = 29 compileSdkVersion = 34 targetSdkVersion = 34 supportLibVersion = "28.1.1" googlePlayServicesVersion = "16.0.0" googlePlayServicesVisionVersion = "15.0.2" androidMapsUtilsVersion = "0.5+" googlePlayServicesAuthVersion = "16.0.1" kotlinVersion = '1.6.21' excludeAppGlideModule = true }

dependencies {
    classpath 'com.android.tools.build:gradle:7.4.2'
    classpath 'com.google.gms:google-services:4.3.15'
    classpath "io.realm:realm-gradle-plugin:10.16.0"
    classpath 'com.huawei.agconnect:agcp:1.9.1.300'
    
    

Environment

  • Platform: React-Native
  • Kit Version
    "@hmscore/react-native-hms-analytics": "^6.12.0-301", "@hmscore/react-native-hms-availability": "^6.12.0-300", "@hmscore/react-native-hms-map": "^6.11.2-303", "@hmscore/react-native-hms-push": "^6.12.0-302",

A3859 avatar Sep 09 '24 18:09 A3859

I am encountering the same issue with react-native-hms-iap. I haven't found any solution, have you?

zehratok avatar Sep 25 '24 14:09 zehratok

I have the same problem, I can't solve it. gradle 8.0.1 react 0.72.12 "@hmscore /react-native-hms-availability": "^6.12.0-300"

Chswell avatar Sep 28 '24 06:09 Chswell

Has anyone found a solution to this issue? I'm also experiencing the same problem with react-native-hms-push and would appreciate any insights or fixes. Thanks!

ChafikGhourabi avatar Nov 13 '24 15:11 ChafikGhourabi

Try to upgrade com.android.tools.build:gradle version based on your gradle version (Reference)

Gabsys avatar Jan 08 '25 11:01 Gabsys