I install react-native-video by yarn,
when I install success,I use command 'react-native link',but failed,
so I link the files manually:
reference https://www.npmjs.com/package/react-native-video android part;
when it done,I use command 'react-native run-android',show this info:
* What went wrong:
A problem occurred configuring project ':react-native-video'.
Java 8 language support, as requested by 'android.enableD8.desugaring= true' i
n your gradle.properties file, is not supported when 'android.useDexArchive= fal
se'.
...
Command failed: gradlew.bat installDebug
can somebody help me to find out the problem?thank you so much
by the way,my react-native version is '0.58.6'.
Related
Error: Command failed: adb shell am start -n com.getgroceryapp/com.getgroceryapp.MainActivity
at makeError (F:\desuvit\projects\workingbranch\MobileApp\node_modules\execa\index.js:174:9)
node version: 12.4.0
npm version: 6.14.7
Using these command for running the app: 1)react-native run-android or npx react-native run-android
also same error
after i upgraded to v12.18.3(node version) also same error.
but i'm trying to run the project getting above error
please help me
advance thanks....
Open Android Studio File -> Project Structure -> Gradle Settings -> Gradle JDK
and set up as
Embedded JDK
This worked for me after trying so many other options.
If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:
npm uninstall -g react-native-cli #react-native-community/cli
I have created my first React Native (Android Wear OS) project and I cannot build it.
I don't understand why the path is linked twice. Can someone help me, please?
rnv run -p androidwear - ERRROR! COMMAND:
gradlew.bat assembleDebug -x bundleReleaseJsAndAssets
FAILED with ERROR:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
The SDK directory 'C:\Users\Dado\Desktop\mojaprva\platformBuilds\helloWorld_androidwear\Users\Dado\AppData\Local\Android\sdk' does not exist.
I get the following error when I run this command
react-native run-android
Configure project :react-native-onesignal
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configure project :react-native-webview
:react-native-webview:reactNativeAndroidRoot C:\Users\VO\Desktop\xxxx\xxxx\node_modules\react-native\android
FAILURE: Build failed with an exception.
What went wrong:
Task installDebug' not found in project ':app'.
Try:
Run gradlew tasks to get a list of available tasks. 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 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 4s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
First check these:
Check that you have installed all your dependencies correctly or not.
react-native-webview and other plugins giving error then try to fix it.
Gradle version are important for specific plugin usage so check it also that you are using supported Gradle version.
Follow these steps:
Close all metro bundles
watchman watch-del-all && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
open Android Studio and open yourprojectname/android
Let Android Studio sync and if there any sync issue then fix it.
Go to File menu -> invalidate cache and restart
Before react-native run-android try to check you have open device or emulator
Check it with adb devices
Now try once.
I'm programming an APP using react-native, but after I pulled from github this morning, it turned out that I couldn't run it anymore. The logs in the command line are as follows:
** BUILD SUCCEEDED **
The following commands produced analyzer issues:
Analyze Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)
Logs in "react-native start" command line are as follows:
error: bundling failed: TypeError: Cannot read property 'bindings' of null
at Scope.moveBindingTo (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/scope/index.js:978:13)
at BlockScoping.updateScopeInfo (/Users/martin/Desktop/ble-server/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:364:17)
at BlockScoping.run (/Users/martin/Desktop/ble-server/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:330:12)
at PluginPass.BlockStatementSwitchStatementProgram (/Users/martin/Desktop/ble-server/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:70:24)
at newFn (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/visitors.js:237:21)
at NodePath._call (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/path/context.js:65:20)
at NodePath.call (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/path/context.js:100:12)
at TraversalContext.visitQueue (/Users/martin/Desktop/ble-server/node_modules/#babel/traverse/lib/context.js:142:16)
BUNDLE [ios, dev] ../../index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.
How could I run it again, it seems that there are no issues with codes.
Please run command first:
npm start
and then
react-native run-ios
You have probably updated react-native improperly please check the documentation.
You may have used npm audit fix which updates react-native.
To fix the problem you can downgrade the react-native version of the app with
npm install react-native#x.x.x"
Then re-compile project with
react-native run-ios"
And don't forget to restart the bundler as well with
react-native start
Then, if you still want to upgrade the react-native version you can use
react-native-git-upgrade
ReactNative fails to deploy build to iOS simulator but does deploy it to Android emulator
Attached are screenshots showing this on both.
Steps:
Created react native app
react-native init proto
Run app on Android emulator after I started emulator
react-native run-android
this is running fine on Android emulator
Run app on iOS simmulator
react-native run-ios
This produces error as per screenshot
Error
** BUILD FAILED **
The following build commands failed:
CompileC /Users/dinob/reactnativework/proto/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTShadowView+Internal.o Views/RCTShadowView+Internal.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/proto.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/proto.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Versions
MacBookPro OSX El Capitain
react-native 0.55.3
react-native-cli 2.0.1
npm 5.5.1
node v8.9.1
watchman 4.9.0
Please have a look here for help with troubleshooting
I would suggest you try all the solutions described in that thread to try and fix this issue. Good Luck!