react-native: ANDROID_HOME variable is not set on Mac OS Big Sur - react-native

I'm trying to build my react-native project on Mac OS Big Sur. Having several issues, I ran react_native doctor command to verify my environment. Here is diagnostics report:
✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
- Version supported: 29.0.3
✖ ANDROID_HOME
Following multiple posts on blogs and answers on SO, I created/edited:
.bash_profile file in my Home directory
.bashrc file in my Home directory
edited /etc/profile file
...and added following lines to these files:
export ANDROID_HOME=/Users/piotrzielinski/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/emulator
Path typed in ANDROID_HOME is taken from Android Studio SDK manager.
Unfortunately, nothing worked permanently. WHat's worse, I'm not talking only about restarts - it seems that restarting VS Code (or its terminal) resets PATH variables and ANDROID_HOME is no longer available.
Please help.

Ok, so I failed to notice that I'm using zsh terminal (visible in title bar of SYSTEM terminal window - didn't notice it because I was using Visual Studio Code terminal!).
So, I created two files in my Home: ~/.zprofile and ~/.zshrc with contents provided in a question.
It worked. Thought it may be worthy for someone struggling the same lack of Mac OS knowledge as I do.

Related

env: sh\r: No such file or directory (React Native)

Recently I have move from windows to macbook and i want to run my project. What happen with this error "env: sh\r: No such file or directory"? I have been success to create a new project but open my last project have this error. Thank you
This fixes it:
dos2unix android/gradlew

Yocto SDK, QtWebEngine: Unknown module(s) in QT: webengine

I'm doing my first steps with Qt and QtWebEngine on an embedded board (i.MX6), using Yocto. Using provided example recipes, like the quicknanobrowser, works nicely on the target. So I can't confirm this answer which claims that WebEngine is not available on embedded platforms.
Now I want to write my own QML application and deploy it on the board. With the recipe meta-toolchain-qt5 I created an SDK and installed it. In QtCreator I set all paths to the SDK installation and tried to build it, but got this error:
Project ERROR: Unknown module(s) in QT: webengine
11:13:13: The process "/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited with code 3.
It turned out that WebEngine was not included in the SDK. Thanks to this answer, I fixed that by putting the following to my own packagegroup-qt5-toolchain-target.bbappend file:
RDEPENDS_${PN} += " \
qtwebengine \
qtwebengine-qmlplugins \
qtquickcontrols-qmlplugins \
qtwebengine-examples \
"
Then reinstalled the SDK. Now it seems that all WebEngine files are available in the SDK installation (the zsh glob pattern below matches all directories in any subdirectory of /opt/poky/1.8/, which contain "webengine", case-insensitively):
% ls -1 -d (#i)/opt/poky/1.8/**/*webengine*(/)
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/5.4.3/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/5.4.3/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/qml/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webengine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webenginewidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/translations/qtwebengine_locales/
Still, I get the same Unknown module error. This is independent of QtCreator, and can also be shown by directly calling qmake:
% source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
% /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/me/test/test.pro -r -spec linux-oe-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
Project ERROR: Unknown module(s) in QT: webengine
The project itself should be fine, because it compiles and runs without problems on the Desktop installation.
Any ideas? Are there maybe still some files missing in the SDK? Where does qmake search for the modules? How can I tell qmake where to find the WebEngine installation?
In /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
add sh /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/environment-setup.d/qt5.sh
This will set up the Qt5 environment.

Xcode 7 - Cannot open document (storyboard file)

I recently updated to Xcode 7 and as usual something has to go wrong. Its really a shame because I was looking forward to the new features in Xcode 7.
I am faced with a an error which I cannot seem to fix. Every time I try and build the project I get the following error:
I thought there was something wrong with my project, so I made a new Single View application and I still get the same error.
I have tried the following things but none of them has worked for me:
Restart Xcode (Didn't work).
Clean and rebuild project (Didn't work).
Restart Mac (Didn't work).
Reinstall Xcode 7 from the Mac App Store (Didn't work).
Installed Xcode 7 on a different Mac (Still got the same issue, even with a new Xcode project).
I tried the solution in this Stack Overflow question: https://stackoverflow.com/a/31614717/1598906 - But alas it did not work.
Finally, I tried the following Terminal command with no avail: $ sudo killall -9 ibtoold
Is anyone else having this issue with Xcode 7.0? And if so, have you managed to come with any other solutions? I have tried everything I can think of and nothing works.
Lastly, below is a copy of the error Log:
2015-09-18 21:09:28.416 ibtoold[1598:39510] [MT] IBPlatformTool: ***
Failed to launch tool with description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find or create execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find a suitable device for the type SimDeviceType :
com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime :
9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 (Failure reason: Failed to create SimDeviceSet at path
/Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.) 2015-09-18 21:09:38.290
ibtoold[1598:39510] [MT] IBPlatformTool: Wrote failed marshalling
request diagnostics to path:
/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000
/* com.apple.ibtool.errors */ /Users/daniel/Desktop/DS
APPS/BT/BloodyTest/BloodyTest/Base.lproj/LaunchScreen.storyboard:
error: Could not open document
Recovery Suggestion: Failed to connect with the iOS agent. Please file a bug report at bugreport.apple.com and attach a zip file of the
diagnostics located at
"/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000".
Underlying Errors:
Description: Failed to find or create execution context for description
System content 1x for IBCocoaTouchFramework-EightAndLater w/ default
fidelity
Underlying Errors:
Description: Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with
runtime SimRuntime : 9.0 (13A340) -
com.apple.CoreSimulator.SimRuntime.iOS-9-0
Failure Reason: Failed to create SimDeviceSet at path /Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.
Thanks for your time, Dan.
Well thanks to the community for all there help..... not.
In the end I got it working by simply upgrading to OS X El Capitan and Xcode 7.0.1.
One thing I would point out though, is that when I was looking through the Xcode app files, some of them were corrupted and when I updated to Xcode 7.0.1 this issue was not fixed. So before installing OS X El Capitan, I deleted the following:
Xcode 7.0.1 app
Library/Developer folder
Macintosh HD/Library/Developer folder
I then installed OS X El Capitan and then installed Xcode 7.0.1 and now everything works fine.
I hope this helps anyone else who is experiencing the same issue.

Couchapp - default template not found when running `couchapp generate ...` on Windows

After thorough browsing I decided to post here as I could not find a working prompt on the problem.
I installed CouchDB and Couchapp (in version 1.0.0, freshest one on Github) on Win8 machine and when I try to run couchapp generate app contacts I get:
2014-11-21 22:01:00 [ERROR] couchapp error: Can't create a CouchApp in C:\Users\
Michal\Desktop\contacts: default template not found.
I have not so far dug deeper into the Couchapp code to see if I can fix it. Fixes applied by Couchapp creator, Benoit, don't work for me.
All advice/constructive criticism much appreciated.
OK, I got it working - all that was needed was to include an environment variable for couchapp.exe. So, if you are installing a standalone version of Couchapp from the downloads section ( https://github.com/downloads/couchapp/couchapp/couchapp-1.0.0-win.zip, e.g. ) you NEED TO MAKE SURE that you first of all execute the installer and then point you environment variables Path to it, that's all. Hope it helps.

Unity3D build error CommandInvokationFailure

When I try to build my project I get the following error
Error building Player: CommandInvokationFailure: Failed to recompile android resource files. See the Console for details.
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe -bootclasspath "C:/Users/Ryan/Documents/android sdk only/android-sdk-windows/platforms/android-20\android.jar" -d "C:\Users\Ryan\Documents\Game - Android\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "-S\R.java" "com\RyanVitter\Game\R.java"
stderr[
-S\R.java:8: error: <identifier> expected
package -S;
Does anybody know why this error is being thrown?
My team had an error similar to this, while trying to integrate the facebook SDK.
It worked fine on the computer which was used to import the SDK, but once things were added to git and commited, all other computers could not build to android, and the above error was shown in the console.
This was because unity seems also change some files outside of the project folder once the SDK is imported( We imported it through the asset store).
The solution then was to also import the facebook SDK to all other PCs via the asset store, and then do a "git reset --hard", which seemed to set up the unity editor correctly.
After these steps the project could build again.