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

Errors - while running the react-native run-android #4

Closed
vineethdas opened this issue Aug 31, 2021 · 7 comments
Closed

Errors - while running the react-native run-android #4

vineethdas opened this issue Aug 31, 2021 · 7 comments

Comments

@vineethdas
Copy link

Hi @mrousavy ,

This is truly amazing work!!

I was trying the instructions to run it for my android device, on a windows machine, got the below error:

Was hoping if you too had any similar issue:

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Usersxxxxxvision_camera\Colorwaver\android\app\build.gradle' line: 162

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

Could not get unknown property 'release' for SigningConfig container of type org.gradle.api.internal.FactoryNamedDomainObjectContainer.

  • 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

BUILD FAILED in 2s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\xxxxx\Colorwaver\android\app\build.gradle' line: 162

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

Could not get unknown property 'release' for SigningConfig container of type org.gradle.api.internal.FactoryNamedDomainObjectContainer.

  • 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

@vineethdas
Copy link
Author

Fixed it by commenting the release block on build.gradle file!!

@vineethdas
Copy link
Author

Got another error:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':react-native-vision-camera'.

com.android.builder.errors.EvalIssueException: NDK at C:\xxxxx\Local\Android\Sdk\ndk\20.1.5948944 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

BUILD FAILED in 47s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

@vineethdas
Copy link
Author

Fixed it by updating the ndkVersion = "21.3.6528147" on build.gradle!

@vineethdas
Copy link
Author

Now getting the below error :

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-vision-camera:externalNativeBuildDebug'.

Build command failed.
Error while executing process C:\xxx\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C C:\Users\vinee\Documents\vision_camera\Colorwaver\node_modules\react-native-vision-camera\android.cxx\cmake\debug\armeabi-v7a VisionCamera}
ninja: Entering directory `C:\Usersxxx\Documents\vision_camera\Colorwaver\node_modules\react-native-vision-camera\android.cxx\cmake\debug\armeabi-v7a'

ninja: error: '../../../../build/third-party-ndk/hermes/jni/armeabi-v7a/libhermes.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libVisionCamera.so', missing and no known rule to make it

  • 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

@vineethdas vineethdas changed the title Error - Could not get unknown property 'release' for SigningConfig container of type Error - while running the react-native run-android Aug 31, 2021
@vineethdas vineethdas changed the title Error - while running the react-native run-android Errors - while running the react-native run-android Aug 31, 2021
@vineethdas
Copy link
Author

@vineethdas
Copy link
Author

Got the next error as :

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\xxx\Documents\vision_camera\Colorwaver\node_modules\react-native-animateable-text\android\src\main\java\com\reactnativereanimatedtext\JBTextViewManager.java:96: error: cannot find symbol
ReadableNativeMap state = stateWrapper.getState();
^
symbol: method getState()
location: variable stateWrapper of type com.facebook.react.uimanager.StateWrapper
Note: C:\Users\xxx\Documents\vision_camera\Colorwaver\node_modules\react-native-animateable-text\android\src\main\java\com\reactnativereanimatedtext\JBTextShadowNode.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

@vineethdas
Copy link
Author

Was able to fix the issue changing the below code, and bring up the application!

ReadableNativeMap state = stateWrapper.getStateData();
For some versions of react-native-animateable-text, 'getState' doesn't work.
So have to change it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant