

Modify the code above to reflect your local environment, then start an emulator and run the modified code to compile your app and load it into the emulator. $a->run # Build, install and run the app on the only emulator $a->title = qq(Generic App) # Title of the app as seen under the icon $a->platformTools = qq(~/Android/sdk/platform-tools/) # Android SDK platform tools folder $a->platform = qq(~/Android/sdk/platforms/android-25/) # Android SDK platform folder

$a->package = qq() # Package name containing the activity for this app $a->keyStorePwd = qq(xxx) # Password for key store file $a->keyStoreFile = qq(~/keystore/release-key.keystore) # Key store file


$a->keyAlias = qq(xxx) # Alias of key to be used to sign this app $a->icon = qq(~/images/Jets/EEL.jpg) # Image that will be scaled to make an icon using Imagemagick - the English Electric Lightening $a->buildTools = qq(~/Android/sdk/build-tools/25.0.2/) # Android SDK Build tools folder My $a = &Android::Build::new() # Create new builder Running compile will load the newly created apk into the emulator as long as it is the only one running. Start the AVD with a specified screen size (you might need to go into the android/sdk/tools folder): emulator -avd aaa -skin "2000x1000" k 'system-images android-25 google_apis x86_64' -g google_apis ~/android/sdk/platform-tools/:~/android/sdk/build-tools/25.0.3Ĭreate an AVD: avdmanager create avd -name aaa \ 'platforms android-25' 'system-images android-25 google_apis x86_64')Īdd to these components to the $PATH variable for easy command line use: export PATH=$PATH:~/android/sdk/tools/:~/android/sdk/tools/bin:\ 'build-tools 25.0.3' emulator 'platform-tools' \ You will need a version of the Android Build Tools as specified right at the end of the page below all the inappropriate advertising for Android Studio.Īnd unzip to get a copy of sdkmanager which can be used to get the version of the SDK that you want to use, for example: sdkmanager -list -verboseĭownload the SDK components to be used: (cd android/sdk/ tools/bin/sdkmanager \Įcho 'y' | android/sdk/tools/bin/sdkmanager \ Sudo cpan install Data::Table::Text Data::Dump Carp POSIX File::Copy You can see Android::Build in action in GitHub Actions at the end of: Prerequisites sudo apt-get install imagemagick zip openjdk-8-jdk openjdk-8-jre Android::Build - Lint, compile, install, run an Android app using the command line tools minus Ant and Gradle thus freeing development effort from the strictures imposed by Android Studio.
