I updated of Appcelerator Studio on Windows 10. During the process I got a message that there were errors during update process and Studio should be restarted.
Now I cannot run or publish apps (combo box is grey) and during every run Appcelerator Studio informs that there is an update to install: Appcelerator CLI core (required) with version N/A. If I try to install it I get following error:
Error encountered during update
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.readConfig (C:\Users\Worker\AppData\Roaming\nvm\v9.4.0\node_modules\appcelerator\lib\util.js:728:30)
at Object.<anonymous> (C:\Users\Worker\AppData\Roaming\nvm\v9.4.0\node_modules\appcelerator\bin\appc:96:23)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
If I had problems with Appcelerator CLI core (required) with version N/A, I always used appc setup from command line and it was fixing the problem. But now if I type that I get same error.
I tried reinstalling Appcelerator, Node (I have updated version) but nothing helped.
Output of error when updating CLI via Studio:
STATUS
------
pluginId com.appcelerator.titanium.core
pluginVersion 3.1.2.1512467051
code 0
severity 4
message HIDDEN
fingerprint [some_value_here]
stacktrace
Exception:org.eclipse.epp.internal.logging.aeri.ui.log.StandInStacktraceProvider$StandInException: HIDDEN
at com.aptana.core.logging.IdeLog.log(IdeLog.java:563)
at com.aptana.core.logging.IdeLog.log(IdeLog.java:598)
at com.aptana.core.logging.IdeLog.logError(IdeLog.java:306)
at com.aptana.core.logging.IdeLog.logError(IdeLog.java:280)
at com.aptana.core.logging.IdeLog.logError(IdeLog.java:258)
at com.appcelerator.titanium.core.StudioVersionManager.getCLIActiveVersion(StudioVersionManager.java:139)
at com.appcelerator.titanium.core.StudioVersionManager.isCurrentCLIVersionCompatibile(StudioVersionManager.java:78)
at com.appcelerator.titanium.core.StudioVersionManager.isActiveCLICompatible(StudioVersionManager.java:49)
at com.appcelerator.titanium.update.core.release.TitaniumStudioRelease.getUpdatesWithStableStream(TitaniumStudioRelease.java:219)
at com.appcelerator.titanium.update.core.release.TitaniumStudioRelease.isInstalled(TitaniumStudioRelease.java:212)
at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater$NotInstalledFilter.include(TitaniumReleasesUpdater.java:105)
at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater$NotInstalledFilter.include(TitaniumReleasesUpdater.java:1)
at com.aptana.core.util.AndFilter.include(AndFilter.java:39)
at com.aptana.core.util.CollectionsUtil.filterInPlace(CollectionsUtil.java:249)
at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.filterToRelevantUninstalledUpdates(TitaniumReleasesUpdater.java:915)
at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.getStudioUpdates(TitaniumReleasesUpdater.java:326)
at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.getAvailableUpdates(TitaniumReleasesUpdater.java:314)
at com.appcelerator.titanium.update.ui.handler.TitaniumUpdateHandler$1.run(TitaniumUpdateHandler.java:66)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
------
REPORT
------
name [email_I_use_to_log_in]
email anonymous
comment
productVersion 5.0.0.201712081732
productName Appcelerator Studio
javaRuntimeVersion 1.8.0_162-b12
osgiWs win32
osgiOs Windows 10
osgiOsVersion 10.0.0
osgiArch x86
Output of ti info as requested:
Operating System
Name = Microsoft Windows 10 Home
Version = 10.0.16299
Architecture = 64bit
# CPUs = 4
Memory = 7.9GB
Node.js
Node.js Version = 8.9.4 //I set to 8.9.4 but had same errors with 9.4.0
npm Version = 5.6.0
Titanium CLI
CLI Version = 5.0.14
node-appc Version = 0.2.41
Titanium SDKs
7.0.0.GA
Version = 7.0.0
Install Location = C:\ProgramData\Titanium\mobilesdk\win32\7.0.0.GA
Platforms = android, windows
git Hash = f09dec4
git Timestamp = 12/5/2017 21:33
node-appc Version = 0.2.43
6.2.2.GA
Version = 6.2.2
Install Location = C:\ProgramData\Titanium\mobilesdk\win32\6.2.2.GA
Platforms = android, mobileweb, windows
git Hash = 42c7196
git Timestamp = 9/19/2017 23:04
node-appc Version = 0.2.43
/****
Here is more SDKS
****/
Intel® Hardware Accelerated Execution Manager (HAXM)
Not installed
Java Development Kit
Version = 1.8.0_162
Java Home = C:\Program Files (x86)\Java\jdk1.8.0_162
Genymotion
Path = C:\Program Files\Genymobile\Genymotion
Genymotion Executable = C:\Program Files\Genymobile\Genymotion\genymotion.exe
Genymotion Player = C:\Program Files\Genymobile\Genymotion\player.exe
Home = C:\Users\Worker\AppData\Local\Genymobile\Genymotion
VirtualBox
Executable = C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
Version = 5.2.0r118431
Android SDK
Android Executable = not found
ADB Executable = C:\android-sdk-win\platform-tools\adb.exe
SDK Path = C:\android-sdk-win
Android NDK
NDK Path = not found
NDK Version = not found
Android Platforms
1) android-23
Name = Android 6.0
API Level = 23
Revision = 3
Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320
ABIs = armeabi-v7a, x86, x86_64
Path = C:\android-sdk-win\platforms\android-23
Android Add-Ons
None
Android Emulators
AVD_for_Nexus_6
ID = AVD_for_Nexus_6
SDK Version = not installed
ABI = armeabi-v7a
Skin = 1440x2560
Path = C:\Users\Worker\.android\avd\AVD_for_Nexus_6.avd
SD Card = no sd card
Google APIs = no
titanium_1_WVGA800
ID = titanium_1_WVGA800
SDK Version = not installed
ABI = armeabi-v7a
Skin = wvga800
Path = C:\Users\Worker\.android\avd\titanium_1_WVGA800.avd
SD Card = C:\Users\Worker\.android\avd\titanium_1_WVGA800.avd\sdcard.img
Google APIs = no
/****
Here is the list Genymotion Emulators
****/
Connected Android Devices
None
Microsoft (R) Visual Studio
14.0 (selected)
Path = C:\Program Files (x86)\Microsoft Visual Studio 14.0\
CLR Version = v4.0.30319
MSBuild Version = vnull
Windows Phone SDKs = not installed
Microsoft (R) Windows Phone SDK
No versions found
Windows PowerShell
Enabled = yes
Windows Phone Emulators
10.0
Windows Phone Devices
Android Issues
! Unable to locate an Android NDK.
Without the NDK, you will not be able to build native Android Titanium modules.
If you have already downloaded and installed the Android NDK, you can tell Titanium where the
Android NDK is located by running 'titanium config android.ndkPath /path/to/android-ndk',
otherwise you can install it by running 'titanium setup android' or manually downloading from
http://appcelerator.com/android-ndk.
!
Android Build Tools 27.0.0 are too new and may or may not work with Titanium.
If you encounter problems, select a supported version with:
ti config android.buildTools.selectedVersion ##.##.##
where ##.##.## is a version in that is 26.x
Windows Issues
× Microsoft Windows Phone SDK not found.
You will be unable to build Windows Phone apps.
You can install it from http://appcelerator.com/windowsphone.
How can I solve this issue?
Finally solved the issue.
Instructions:
Uninstall Appcelerator Studio.
Remove directories with settings:
.android
.appcelerator
.titanium
Unistall npm modules:
npm uninstall -g titanium
npm uninstall -g alloy
npm uninstall -g acs
npm uninstall -g appcelerator
Reinstall Appcelerator Studio.
If still have problems: Close Appcelerator Studio, type appc setup and restart Appcelerator Studio.
Related
I am creating an application in flutter and everything was going well, but at the moment it started giving me an error. It won't let me compile and flutter pub upgrade and flutter pub outdated don't work, but flutter pub get if it works fine.
I am new to flutter and I will not understand most of the things they tell me, please, if you can explain me as detailed as possible I would appreciate it
Flutter --no-color build apk
C:\src\flutter\bin\flutter.bat --no-color build apk
Building with sound null safety
Running Gradle task 'assembleRelease'...
/C:/Users/LEO/AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-2.3.3/lib/src/google_fonts_base.dart:14:1: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
import 'asset_manifest.dart';
^^^^^^^^^^^^^
/C:/Users/LEO/AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-2.3.3/lib/src/google_fonts_base.dart:32:31: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
AssetManifest assetManifest = AssetManifest();
^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1154
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 18s
Running Gradle task 'assembleRelease'... 18,8s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1`
Flutter pub upgrade
C:\src\flutter\bin\flutter.bat --no-color pub upgrade Resolving dependencies... Git error. Command: git rev-list --max-count=1 HEAD`
stdout:
stderr: usage: git rev-list [] ... [--] [...]
limiting output:
--max-count=
--max-age=
--min-age=
--sparse
--no-merges
--min-parents=
--no-min-parents
--max-parents=
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--exclude-hidden=[receive|uploadpack]
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--disk-usage[=human]
--unpacked
--header | --pretty
--[no-]object-names
--abbrev= | --no-abbrev
--abbrev-commit
--left-right
--count
special purpose:
--bisect
--bisect-vars
--bisect-all
exit code: 129
Process finished with exit code 69`
Flutter pub get
C:\src\flutter\bin\flutter.bat --no-color pub get Resolving dependencies... build_runner 2.3.3 (2.4.0 available) cross_file 0.3.3+2 (0.3.3+4 available) flutter_adaptive_scaffold 0.0.9 (0.1.0 available) flutter_facebook_auth 4.4.1+1 (5.0.7 available) flutter_facebook_auth_platform_interface 3.2.0 (4.1.1 available) flutter_facebook_auth_web 3.2.0 (4.1.1 available) flutter_html 3.0.0-alpha.5 (3.0.0-alpha.6 available) flutter_html_audio 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_svg 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_table 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_video 3.0.0-alpha.4 (3.0.0-alpha.5 available) flutter_launcher_icons 0.9.3 (0.11.0 available) flutter_layout_grid 1.0.6 (2.0.1 available) flutter_local_notifications 8.2.0 (13.0.0 available) flutter_local_notifications_platform_interface 4.0.1 (6.0.0 available) flutter_slidable 1.3.2 (2.0.0 available) flutter_svg 1.1.6 (2.0.0+1 available) google_fonts 2.3.3 (4.0.3 available) google_geocoding 0.2.0 (discontinued) google_maps_flutter_web 0.3.3 (0.4.0+5 available) image 3.3.0 (4.0.13 available) intl 0.17.0 (0.18.0 available) json_serializable 6.6.0 (6.6.1 available) mobx 2.1.3 (2.1.3+1 available) numerus 1.1.1 (2.0.0 available) share 2.0.4 (discontinued) shared_preferences_foundation 2.1.2 (2.1.3 available) source_gen 1.2.6 (1.2.7 available) table_calendar 3.0.8 (3.0.9 available) timezone 0.8.0 (0.9.1 available) webview_flutter 3.0.4 (4.0.2 available) webview_flutter_android 2.10.4 (3.2.4 available) webview_flutter_platform_interface 1.9.5 (2.0.1 available) webview_flutter_wkwebview 2.9.5 (3.0.5 available) win32 3.1.3 (4.1.1 available) Got dependencies! Process finished with exit code 0
Flutter doctor
`Windows PowerShell
Copyright (C) Microsoft Corporation. Todos los derechos reservados.
PS C:\Windows\System32\WindowsPowerShell\v1.0> flutter doctor -v
[√] Flutter (Channel master, 3.8.0-3.0.pre.22, on Microsoft Windows [Versi¢n 10.0.17763.107], locale es-CU)
• Flutter version 3.8.0-3.0.pre.22 on channel master at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 69421c1 (34 hours ago), 2023-02-02 23:28:57 -0800
• Engine revision e3fe6dade9
• Dart version 3.0.0 (build 3.0.0-198.0.dev)
• DevTools version 2.21.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\src\Sdk
• Platform android-33-ext4, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.4.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
• Visual Studio Build Tools 2022 version 17.4.33213.308
• Windows 10 SDK version 10.0.20348.0
[√] Android Studio (version 2021.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versi¢n 10.0.17763.107]
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.120
! Device 9888d9463636504450 is offline.
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
PS C:\Windows\System32\WindowsPowerShell\v1.0>`
I tried flutter clean, pub get, I tried in another project and everything is fine, the error is in this one only
This error message indicates that there is a naming conflict with the import of AssetManifest class in your code. It looks like you have imported the AssetManifest class from both package:flutter/src/services/asset_manifest.dart and package:google_fonts/src/asset_manifest.dart which are conflicting with each other.
To fix this issue, you can specify the import path with an alias to differentiate between the two imports like this:
import 'package:flutter/src/services/asset_manifest.dart' as flutter_asset;
import 'package:google_fonts/src/asset_manifest.dart' as google_fonts_asset;
Then, you can use the aliases to access the AssetManifest class like this:
flutter_asset.AssetManifest
google_fonts_asset.AssetManifest
Alternatively, if you only need to use one of the AssetManifest classes, you can remove the import of the other class to avoid the conflict.
I'm having a problem with React Native and Android licenses.
My Android knowledge is dated, I do write React but have no experience with React Native. Which is why I hired someone to turn a progressive web app I made into a native one. But due to circumstances I now have to finish the final thing myself.
The app was created on a mac, I'm trying to run it on pc.
The app does build for both IOS and Android from the Microsoft Appcenter. So I know it works, but I want it to run locally as well.
After doing all the installing and running react-native run-android the build starts but halts due to unaccepted licenses.
I already had Android Studio installed. I have checked the SDK Manager for the correct package versions (with 'show package details').
Updated everything I can think of including reinstalling Android Studio for the nth time. After the first uninstall/reinstall it would put it into a directory suffixed with '1' probably because the original directory couldn't be deleted. Yet the environment variables still pointed to the one without the suffix.
Accepting the licenses through cli with sdkmanager --licenses did opt me to accept a couple of times, but it didn't match the number of unaccepted packages I get from the react-native run-android error and the error remained the same afterwards (forgot to pay attention to which packages I was accepting though).
Two curious things:
- the error seems to be looking for licenses in a folder licenses yet my Android Studio folder only contains a folder license
- the error states Using Android SDK: C:\Program Files\Android\Android Studio but during the install of Android Studio I put mine in C:\AndroidSDK because it was whining about spaces.
Here is the error I get after running react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 905 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
> Configure project :app
Checking the license for package Android SDK Platform-Tools in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Platform-Tools not accepted.
Checking the license for package SDK Patch Applier v4 in C:\Program Files\Android\Android Studio\licenses
Warning: License for package SDK Patch Applier v4 not accepted.
Checking the license for package Android Emulator in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android Emulator not accepted.
Checking the license for package Android SDK Tools in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Tools not accepted.
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 28 in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Platform 28 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
patcher;v4 SDK Patch Applier v4
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
emulator Android Emulator
tools Android SDK Tools
platforms;android-28 Android SDK Platform 28
platform-tools Android SDK Platform-Tools
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Program Files\Android\Android Studio
* 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 4s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
error Failed to install the app. Please accept all necessary SDK licenses using SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses". Run CLI with --verbo
se flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
patcher;v4 SDK Patch Applier v4
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
emulator Android Emulator
tools Android SDK Tools
platforms;android-28 Android SDK Platform 28
platform-tools Android SDK Platform-Tools
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Program Files\Android\Android Studio
* 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 4s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
at checkExecSyncError (child_process.js:611:11)
at execFileSync (child_process.js:629:15)
at runOnAllDevices (C:\Users\foo\bar\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAl
lDevices.js:74:39)
at buildAndRun (C:\Users\foo\bar\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:15
8:41)
at C:\Users\foo\bar\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\Users\foo\bar\node_modules\#react-native-community\cli\build\cliEntry.js:160:7)
when I try to run a basic alloy app (two-tabbed template) I get this error:
[ERROR] : : Cannot find module './validators/react/isReactComponent'
[ERROR] : Alloy compiler failed
[ERROR] Application Installer abnormal process termination. Process exit value was 1
But when I run a classic app (two-tabbed template) whithout alloy then program runs ok.
My system is:
Operating System
Name = Mac OS X
Version = 10.14.5
Architecture = 64bit
Node.js
Node.js Version = 8.9.1
npm Version = 5.5.1
Appcelerator CLI
Installer = 4.2.15
Core Package = 7.1.2
Titanium CLI
CLI Version = 5.2.2
node-appc Version = 0.2.49
Try to update your Node version to 10.x (e.g. https://nodejs.org/dist/latest-v10.x/). After that install the CLI again (npm install -g appcelerator titanium alloy) and run appc use 7.1.2 --force to be sure that all packages are rebuild and you should be able to run the app
I want to start React native programming. so in CMD I tried react-native init AwesomeProject then tried react-native run-android but I had some errors that I could not find solution.
some of errors resolved by editing this project in android studio:
add implementation 'androidx.appcompat:appcompat:1.1.0' to build.gradle
and change classpath("com.android.tools.build:gradle:3.4.2") to classpath("com.android.tools.build:gradle:3.5.0")
but emulator showed me
Unable to load script....
showed in this image:
error in emulator
befor this message it showed me on my phone:
JSIExecutor+JSCRuntime does not support Sampling Profiler
so I tried to create the assets directory in
...AwesomeProject\android\app\src\main\
and run gradlew clean in my root project directory.then I tried
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
but this error is occurred:
....error Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[
\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\
\.*)$/: Unterminated character class. Run CLI with --verbose flag for more detai
ls.
SyntaxError: Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\
]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__t
ests__\\.*)$/: Unterminated character class....
and that error is showed me again in emulator.
I clicked Reload in emulator but it show me this error:
could not connect to development server...
i run react-native info for mor details and its result is:
info Fetching system and libraries information...
System:
OS: Windows 7
CPU: (8) x64 Intel(R) Core(TM) i7 CPU Q 740 # 1.73GHz
Memory: 892.99 MB / 3.98 GB
Binaries:
Node: 12.11.1 - C:\Program Files\nodejs\node.EXE
npm: 6.11.3 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29
Build Tools: 25.0.0, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3, 29.0.1, 29.0.2
System Images: android-25 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
the screen shot of react-native run-android command is :
CMD screen shot
and logcat in android studio after runing react-native run-android show this error:
first screen shot of logcat in android studio
then i clicked on reload and logcat showed this error:
logcat screen shot when click on reload
what is problem and how can i resolve it?
my problem is solved.
I tried to run choco uninstall nodejs.install and choco uninstall npm in CMD then I run choco install nodejs.install --version=10.16.3 and choco install npm --version=6.9.0
when I run react-native run android I had other problems, So I opened my project in Android studio and add bellow codes to build.gradle:
implementation "com.facebook.react:react-native:0.61.2" // From node_modules
implementation 'com.android.support:appcompat-v7:27.0.1'
of course that project had some warnings that using Android studio resolved them.
finally react-native run-android work correctly without error.
Adnan comment was helpful but I could not understand why:
React causes lots of errors because of version incompatibility
when I followed official website?!
The way how I ran React-Native for the first time is by following these steps mentioned on the official site:
https://facebook.github.io/react-native/docs/getting-started.html
1) Download NodeJS from this link and install
https://nodejs.org/en/
2) Download Python from this link and install
https://www.python.org/downloads/
3)download JDK from this link and install
https://www.oracle.com/technetwork/java/javase/downloads/index.html
4) If you do not have android studio installed on your PC, download from this link and install
https://developer.android.com/studio/index.html
And later install SDK from within android studio
5) Configure the ANDROID_HOME environment variable
Go to Environment variables and create a new User variable ANDROID_HOME and add the SDK path to Variable path
The default SDK location: c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
If you changed the SDK location in step 4, add that path above
6) Add platform-tools to Path
Go to Environment variables and in User variables, click on Path>Edit>New
Add this path in the text field
c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools
If you changed SDK location, then your SDK path/platform-tools
7) Install a nice text editor like this one, VS Code:
https://code.visualstudio.com
8)Goto Viw>Terminal in VS Code, run this command
npm install -g react-native-cli
9)Create a new project
react-native init NewProjectName
10)For running the project on a physical device, follow these steps:
https://facebook.github.io/react-native/docs/running-on-device
OR use a virtual device like Genymotion
11) Run the project
-Goto your project folder, run this in VS Code terminal:
cd NewProjectName cd means change directory
-Run the project:
react-native run-android
Hope this helps!
I ran my project without any errors following these steps
IMPORTANT
Do not forget to run VS Code As Administrator if your project is in C:/Users/.. folder because it needs administrative privileges to make changes to that folder.
Make sure Metro Server window is running. The Metro Server starts automatically after running react-native run-android.
See the picture below, the top window is the server window.
npm run android is not working.
node version: v8.9.4
npm version: 5.7.1
genymotion: 2.12.0
I'm getting the error:
Could not determine java version from ‘10’
I don't have have an Android Studio installed, but I have installed Gradle 4.6, and also set the path for Java, created JAVA_HOME and set path for genymotion.
Revert back the java version to 8*. Android does not support 9 or above, yet.