What is Vagrant? How do I use it?

I am new to Open-Source. I was expecting this code to run with android Studio.
But it is not how it works.. So i was wonder can anyone help me with understanding what is vagrant and how can i install and work with it?

Your help would be appreciated.

A virtual develpment environment, which can be shared with others, as well.

Note that if you're looking to do serious work with App Inventor, it's almost always better to get your native environment set up for builds since building on your native environment is much faster than running through vagrant.

We mostly make use of IntellJ for doing App Inventor development. You can use its Import from Sources feature to set up a project, although generally we build using ant.

1 Like

I am following the setup instructions from ReadMe file on my MacOS.

when I command "vagrant up" a ERROR appears. Can anyone help me with it?

shubhampuhal@Shubhams-MacBook-Air appinventor-sources % vagrant up         

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/bionic64' version '20221207.0.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8888 (guest) => 8888 (host) (adapter 1)
    default: 9876 (guest) => 9876 (host) (adapter 1)
    default: 9990 (guest) => 9990 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "0343b4f7-7ac9-4fed-8929-6c5139b261ac", "--type", "headless"]

Stderr: VBoxManage: error: Could not open the medium '/Users/shubhampuhal/VirtualBox VMs/ForAppinventor2-bionic64/ubuntu-bionic-18.04-cloudimg.vmdk'.
VBoxManage: error: VMDK: inconsistency between grain table and backup grain table in '/Users/shubhampuhal/VirtualBox VMs/ForAppinventor2-bionic64/ubuntu-bionic-18.04-cloudimg.vmdk' (VERR_VD_VMDK_INVALID_HEADER).
VBoxManage: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/Users/shubhampuhal/VirtualBox VMs/ForAppinventor2-bionic64/ubuntu-bionic-18.04-cloudimg.vmdk' (VERR_VD_VMDK_INVALID_HEADER)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium

shubhampuhal@Shubhams-MacBook-Air appinventor-sources % 

Did you check macOS specific instruction? Which are there with readme,

Note 1: For macOS users, if you are using VirtualBox and get any error while initializing the VM it may be due to security restrictions in System Preferences, consider reading this article.

Note 2: If it seems like none of the dependencies are installed in the VM, run vagrant provision.


Why are you not going with Setup instructions (manual)

@Shubham_Puhal I also recommend you do manual installation rather than using VAGRANT.

Our vagrant configuration makes use of VirtualBox, which requires virtualization capabilities on your host device. If you're using a newer MacBook Air with Apple Silicon you won't be able to run the VM since it's an Intel based VM.