react-native-template-obytes icon indicating copy to clipboard operation
react-native-template-obytes copied to clipboard

pnpm android gives an error: A problem occurred configuring project ':expo-modules-core' -> ../25.1.8937393 did not have a source.properties file

Open BishalN opened this issue 1 year ago • 1 comments

Summary:

I did the getting started: when i ran the pnpm android throws error

Steps to reproduce:

nothing fancy just create the app and run pnpm ios; I am on mac m1

Expected behavior:

Throws above error

Additional notes:

Here's the log i got cross-env EXPO_DEBUG=true EXPO_NO_DOTENV=1 expo run:android expo:env Skipping .env files because EXPO_NO_DOTENV is defined +0ms Resolved port: 8081, start dev server: true expo:start:platforms:android:adbServer /Users/bishalneupane/Library/Android/sdk/platform-tools/adb devices -l +0ms expo:start:platforms:android:adbServer /Users/bishalneupane/Library/Android/sdk/platform-tools/adb -s emulator-5554 emu avd name +19ms expo:start:platforms:android:adbServer /Users/bishalneupane/Library/Android/sdk/platform-tools/adb devices -l +46ms expo:start:platforms:android:adbServer /Users/bishalneupane/Library/Android/sdk/platform-tools/adb -s emulator-5554 emu avd name +18ms expo:android:resolveDevice Resolved default device (name: Pixel_XL_API_32_2, pid: emulator-5554) +0ms expo:run:android Package name: com.obledgerhub.development +0ms › Building app... expo:start:platforms:android:gradle /Users/bishalneupane/Desktop/myprojects/rn-dev/obledgerhub/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 +0ms Configuration on demand is an incubating feature.

Configure project :app ℹ️ Applying gradle plugin 'expo-dev-launcher-gradle-plugin' ([email protected])

FAILURE: Build failed with an exception.

  • Where: Script '/Users/bishalneupane/Desktop/myprojects/rn-dev/obledgerhub/node_modules/expo-modules-autolinking/scripts/android/autolinking_implementation.gradle' line: 377

  • What went wrong: A problem occurred evaluating project ':expo'.

A problem occurred configuring project ':expo-modules-core'. com.android.builder.errors.EvalIssueException: [CXX1101] NDK at /Users/bishalneupane/Library/Android/sdk/ndk/25.1.8937393 did not have a source.properties file

  • 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 9s 10 actionable tasks: 10 up-to-date

BishalN avatar May 15 '24 03:05 BishalN

Hello @BishalN thank you for sharing with us your issue, based on what i am seeing It looks like the build process failed due to an issue with the Android NDK. Specifically, the error message indicates that the NDK directory is missing the source.properties file. Here's how you can resolve this issue

  1. Verify NDK Installation: - Open Android Studio. - Navigate to Preferences (or File -> Settings on Windows) -> Appearance & Behavior -> System Settings -> Android SDK. - Click on the SDK Tools tab. - Ensure that the NDK is installed. If it is not, install it and ensure the version includes the source.properties file.

  2. Reinstall or Update NDK: - If the installation might be corrupted, try reinstalling the NDK. - Delete the 25.1.8937393 folder located in /Users/bishalneupane/Library/Android/sdk/ndk/. - Reinstall the NDK through Android Studio.

  3. Ensure Correct NDK Path: - Open your project's local.properties file. - Ensure it includes a line like: ndk.dir=/Users/(your name)/Library/Android/sdk/ndk/25.1.8937393 - Verify that you're using a valid and complete version of the NDK.

  4. Check for Updates: - Ensure your Android build tools, SDK, and NDK are up to date, as updates can resolve compatibility issues and missing files.

  5. Clean and Rebuild the Project: - try to rebuild the project by add --clean to delete native folder pnpm prebuild --clean

if this error still occurs please let us know

hamzamekk avatar May 15 '24 13:05 hamzamekk

thanks @hamzamekk. Turns out I didn't have the ndk.

BishalN avatar May 18 '24 02:05 BishalN