Testing Ionic2 app on real device - ionic-framework

I am building an app using Ionic 2 and I am at the stage of wanting to test it on a real device. For now I just want to test it on my android phone. I have enabled developer tools but when I try "ionic build android" or "ionic run android" on windows command prompt, I get this error:
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Where/how do I set the path manually?

Assuming it wasn't already set by the SDK:
For Windows 10 and Windows 8:
In Search, search for and then select: System (Control Panel)
For Windows 7: From the desktop, right click the Computer icon. Choose Properties from the context menu.
Then:
Click the Advanced system settings link.
Click Environment Variables.
In the section System Variables (or User if you prefer), Click New and name it ANDROID_HOME.
Enter the correct path where the executable files are located

Related

'flutter' is not recognized as an internal or external command

I added the route to the bin to the PATH but CMD still doesn't recognize it. I have Windows 10.
echo %PATH%;
where the bin is located;
I tried to write flutter commands in CMD, but it gave "'flutter' is not recognized as an internal or external command" feedback
hi I think this link will help https://www.fluttercampus.com/guide/200/flutter-is-not-recognized-as-an-internal-or-external-command/
try reinstalling flutter too and then run this command => flutter doctor
and I suggest using git-bash instead of cmd
Go to properties by right clicking computer icon.
click on Advanced system settings. (left side of the window)
opens Environment Variables
double click on path
Click on New and paste the path of the bin folder located in the flutter sdk folder.
example : C:\src\flutter\bin
Click OK OK and OK
Restart your pc (Recommend)

Oculus Developer Hub hangs on "Installing..." for everything under the Downloads category

Prior to today, everything was working fine and I was able to deploy from Unity to specifically an APK. I wasn't able to operate in "Play" mode so I tried updating the Oculus Platform SDK, which proceeded to hang in "Installing..." forever, leading to my current predicament.
What happens:
I hit "download" on anything inside the Downloads section of the Oculus Developer Hub
It hangs saying "Installing..." for hours and does nothing.
Also, when I try to change my ADB Path in Oculus Developer Hub, it "fails" and asks me to try again, but the new value is present every time.
I've tried installing/uninstalling both ODH and Oculus software. I've tried changing the ADB path. I've tried installing and adding JRE and NDK to the path. I'm running out of options here. Does anyone have any advice? This is blocking me from doing development work in Unity.
To avoid issues, ODH (Oculus Developer Hub) must reference the same adb.exe as the one referenced by your Unity Editor.
If, for instance, you are using the Unity Editor 2021.3.1f1 with the standard settings (you didn't changed the default installation path and also installed the Android Build Support module and the corresponding sub-modules), then Unity will use the adb.exe found in:
C:\Program Files\Unity\Hub\Editor\2021.3.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe
ODH has a buggy behavior when trying to change the ADB path (ODH > Settings > General > ADB Path > Edit): when you select the desired adb path from the Detected ADB Clients drop down and click Restart ODH, you get the following error message:
"Unable to change ADB path and restart ODH. Please try again."
Just ignore the error message. Dont' click Cancel, just close ODH and start it again. Then navigate again to the menu where you changed the ADB path, i.e. ODH > Settings > General > ADB Path > Edit. You should now have the path you chose before manually restarting ODH.

Flutter cannot connect to emulator in VSCode. Waiting for a connection from Flutter

I can see the device list on VSCode in Windows.
And I can select any one.
And the emulator is opening.
But I can see a single message. "Waiting for a connection from Flutter.."
Application does not open.
It doesn't get any errors either. Waiting like this.
Make sure that your API level you're running your device on is the
same as what you have installed on Android Studio.
1.1 Click on the SDK Manager button around the top right corner of AS (The icon is a box with a down arrow next to it).
1.2 Choose the same API level as your device, (When I didn't do this I had a partial install and it took some time to compile), then
click apply and wait for it to install.
We're going to run the project to our avd or mobile device from the directory of ourproject.
2.1 Open up the Command Prompt (preferably as Admin), and chage the directoy to where your project is, the command should look something
like this:
cd Documents/flutterprojects/yourflutterproject.
2.2 Finally type the command flutter run.
Restart the Emulator by holding the power Button and Selecting restart and then try again.
if that failed to work, simply restart your computer.

Why Visual Studio code and most of the applications are not installing in fresh windows 10?

I am trying to install Visual Studio Code in my fresh windows 10 but it is throwing an error Setup was unable to create a directory
Error 5: Access is denied
Since your UAC(User Account Control) is turned off, and you are running the install as Admin (because you already are admin), it seems like a permission issue and not a UAC issue. Try this:
Create a folder name "Temp" under C:\ // This step is important, the
folder has to exist.
Right click the Computer in Start menu and select Properties. Click
Advanced System Setting. In System Properties windows, click
Advanced tab.
Click Environment Variables button. Under User
variables list, double click TMP.
Change Variable value: from
"%USERPROFILE%\AppData\Local\Temp" to "C:\Temp".
Try to install.

Flutter install in windows environment variable

I have problem when trying to install the flutter in my desktop first I get error of :
is not recognized as an internal or external command operable program or batch file.
Then I open the system environment variable and add the flutter to the user variables path plus I add all of the flutter, git, system32 to systems variables path section.
Unfortunately, the problem is still present even with a restart.
Now when I type flutter doctor to Command prompt No results are shown and I cannot write an extra line.
Welcome to stackoverflow!
You should take these steps:
Open RUN by shortcut (WINDOWS_KEY+R_KEY)
Type in RUN SystemPropertiesAdvanced.
System Properties dialog should appear, click Environment Variables.
In User variables (The Top section) select Path and click Edit.
Add the new path to flutter Binary folder like this C:\flutter\bin.
Select OK, and OK again in Environment Variables, and OK in System Properties.
Close any Command prompt you using and reboot the system.
Hooray, :D now flutter is successfully installed.