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

"eas build --profile production --platform android --local" command build failed, local.properties could not be found #364

Open
xiaobc1234 opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
status: investigating The issue is under investigation, which is determined to be non-trivial. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@xiaobc1234
Copy link

Summary

I refer to the "Set Google Maps API Key" section of the react-native-navigation-sdk document and load the api key through local.properties. For specific documentation, refer to: https://github.com/googlemaps/react-native-navigation-sdk?tab=readme-ov-file

Android packaging reports an error, the error message is as follows:

FAILURE: Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Build file '/private/var/folders/fv/5yyyf4rn0v7ftmbwpb0dhdc40000gq/T/eas-build-local-nodejs/01da7947-9e53-4ec3-85e5-29f00d6602b9/build/android/build.gradle' line: 31
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating root project 'MicoClientApp'.
[RUN_GRADLEW] > Failed to apply plugin 'com.facebook.react.rootproject'.
[RUN_GRADLEW]    > A problem occurred configuring project ':app'.
[RUN_GRADLEW]       > Failed to notify project evaluation listener.
[RUN_GRADLEW]          > The file '/private/var/folders/fv/5yyyf4rn0v7ftmbwpb0dhdc40000gq/T/eas-build-local-nodejs/01da7947-9e53-4ec3-85e5-29f00d6602b9/build/android/local.properties' could not be found

Secrets configuration in android/app/build.gradle is as follows:

secrets {
    // This example application employs the Gradle plugin
    // com.google.android.libraries.mapsplatform.secrets-gradle-plugin
    // to securely manage the Google Maps API key.
    // For more information on the plugin, visit:
    // https://developers.google.com/maps/documentation/android-sdk/secrets-gradle-plugin
    propertiesFileName = "local.properties"

    // For CI/CD, you can have a file with default keys that can be
    // safely checked in to your source code version control.
    // defaultPropertiesFileName = 'local.defaults.properties'

    // Ignore all keys matching the regexp "sdk.*"
    ignoreList.add("sdk.*")
}

Local execution "npx expo run:android --port=8082" everything is normal, prod package reports an error

What platform(s) does this occur on?
Android

expo SDK Version
51.0.8

Environment

expo-env-info 1.2.1 environment info:
    System:
      OS: macOS 14.2.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.13.0 - /usr/local/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 10.5.2 - /usr/local/bin/npm
    Managers:
      CocoaPods: 1.15.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Android Studio: 2024.1 AI-241.18034.62.2411.12071903
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      expo: ~51.0.8 => 51.0.39 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.2 => 0.74.2 
      react-native-web: ~0.19.6 => 0.19.13 
    npmGlobalPackages:
      eas-cli: 12.5.1
      expo-cli: 5.4.12
    Expo Workflow: bare

Refer to the google map sample code: https://github.com/googlemaps/react-native-navigation-sdk/blob/main/example/android/app/build.gradle

@xiaobc1234 xiaobc1234 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 26, 2024
@jokerttu jokerttu added status: investigating The issue is under investigation, which is determined to be non-trivial. and removed triage me I really want to be triaged. labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: investigating The issue is under investigation, which is determined to be non-trivial. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants