You can install.apk files to emulator regardless of what you are using (Eclipse or Android Studio) here's what I always do: (For full beginners) 1- Run the emulator, and wait until it's completely started. 2- Go to your sdk installation folder then go to platform-tools (you should see an executable called adb.exe) 3- create a new file and call it run.bat, edit the file with notepad and write CMD in it and save it. 4- copy your desired apk to the same folder 5- now open run.bat and write adb install 'yourapkfile.apk' 6- wait until the installation is complete 7- voila your apk is installed to your emulator. Note: to re-install the application if it already existe use adb install -r 'yourapkfile.apk' sorry for the detailed instruction as I said for full beginners Hope this help. Regards, Tarek.
For Linux: once emulator is running, the following worked for me. Because I installed the Android SDK on my home directory, I have the following file structure:. home/Android/Sdk/platform-tools/adb. home/AndroidStudioProjects/Metronome.adk AndroidStudioProjects is a file folder I made for my Android projects. 'Metronome.adk' is the file I want to run. So, using Terminal from the home directory./Android/Sdk/platform-tools/adb install./AndroidStudioProjects/Metronome.adk Being a Linux novice, I often forget the need to put the './' in when trying to locate a file or run a command.
After the command achieves 'Success', the app is in the Apps area of the emulator and can be run.
Nov 14, 2018 - Android Studio then displays the unpacked APK files, similar to figure 1. Use the Android profiler to start testing your app's performance.
Package Your Cordova App for Publishing to an App Store. 17 minutes to read. Contributors. In this article When you build an application for deployment to an emulator, simulator, physical device or the Cordova Simulate browser, you're building a version of the application specifically crafted for local testing of the app.
The app is usually built with debug information packaged into the executable, and the app is signed with a signing key which allows it to work on your local device, but not on any device. Before you can build your application for deployment to any device through a public app store, you must first configure Visual Studio with the information it needs to complete the process of packaging and signing the application for deployment through an app store. In this article, you'll learn how to configure a project for deployment and create a deployment package for each target platform:. Android Applications For Android applications, preparing your environment for publishing, and publishing the app requires that you complete the following steps:.
1. Android: Modify Application Settings As you prepare to publish your shiny new Cordova application, start in the application's configuration and make sure your settings for the application are correct.
A Cordova app's settings are maintained in the project's config.xml file. In the Visual Studio Solution Explorer, double-click the config.xml file to open the custom configuration editor shown in the following figure: The editor's Common tab contains general settings for your app; populate the fields in the form with the appropriate values for your application.
The critical settings for any Cordova application are:. Display Name: the application's public name; this is the how the app will appear in the app store and on the target mobile device's home screen and application listing. Populate this field with a brief word or phrase that describes your app, keeping in mind that app tiles on a device's home screen don't leave much room for text.
The value you enter here is added to the config.xml in the element. Package Name: the unique identifier for this application. Developers typically populate this field with a combination of the developer's company domain in plus the short name for the application. The value you provide here is added to the widget element's id attribute as shown in the following example'.
Domain Access: Manages a list of domains that the application can access; the values you enter here are added as access elements to the config.xml as shown in the following example: The purpose of most other settings clear from the title, but you can find more information about them here:. Switch to the editor's Android tab to set Android-specific settings for the application. These settings control the conditions under which the application runs on an android device. Each input field on the form corresponds to a specific entry in the project's config.xml file:.
Version Code: android-versionCode - a string value, used to set the project's for the app. See for additional information. Minimum API level: android-minSdkVersion - an integer value that represents the minimum device API level for the application. The application will not install on a device if its OS API level is lower than this value. Maximum API level: android-maxSdkVersion - an integer value that represents the maximum device API level for the application.
The application will not install on a device if its OS API level is higher than this value. Target API level: android-targetSdkVersion - an integer value representing the application's.
Keep Running: KeepRunning - a Boolean value used to determine whether the application stays running in the background after the pause event fires. A false value does not kill the app after a pause event, but simply halts execution of code within the Cordova WebView while the app is in the background.
Launch Mode: AndroidLaunchMode - a string value that sets the Activity android:launchMode attribute in the application. This changes what happens when the app is launched from app icon or intent and is already running. Valid values are standard, singleTop, singleTask, and singleInstance. Show Title: ShowTitle - a Boolean value that controls whether the application displays the app title at the top of the application's main screen. In-App Browser Storage: InAppBrowserStorageEnabled - Controls whether pages opened within an InAppBrowser window can access the same localStorage and WebSQL storage as pages opened with the default browser. You can read about each configuration option in the Cordova guide. Android: Generate a Private Certificate When running Android applications using the Android SDK (which Visual Studio uses under the covers), applications are signed with a debug certificate generated by the Android SDK tools.
Before you can sign Android applications for deployment via other means, you must use a signing certificate for your organization. If you already have a certificate you would like to use to sign your Android applications, feel free to skip the remainder of this section. Note If your existing keystore is in a protected folder (like c: for example), or you'll be generating a keystore in a protected folder, you'll need to open the command prompt in Administrator mode for these steps to complete successfully.
If your system is configured with the Java SDK bin folder on the system PATH, then skip to the next step. You can confirm this by typing javac in the command window and pressing enter. If you receive an error message, the JDK is not on the path.
If you see the Java Compiler help page, then you're in good shape and can skip this step. In the Command Prompt, change directories to the Java SDK's bin folder. If your development system has the%JAVAHOME% environment variable set, then it should be%JAVAHOME% bin. You can also switch to the SDK folder using the complete path (such as: C: Program Files Java jdk1.8.0111 bin). In the Command Prompt, execute the following command: keytool -genkeypair -v -keystore FILE-PATH MY-KEYSTORE-NAME.keystore -alias MY-ALIAS -keyalg RSA -keysize 2048 -validity 10000 Replacing FILE-PATH MY-KEYSTORE-NAME.keystore and MY-ALIAS with the appropriate values for your needs.
Note Do not select one of the Simulate in Browser options, they don't generate a native application binary. Choose only an Android emulator or Device. In the Build menu, select Build Solution. This creates a release build of the application, a file with an.apk file extension. This is the file that you'll upload to the store when you deploy the application.
When the build completes, look for the.apk file; you'll find it in the project's bin/Android/Release/ folder. When uploading the app to the app store, be sure to select the file that does not include the word unaligned in the file name. At this point, you have a release version of the application all ready to distributed through the Google Play App Store.
IOS Applications For iOS applications, preparing your environment for publishing, and publishing the app requires that you complete the following steps:. 1.
IOS: Request a Distribution Certificate Apple uses Distribution Certificates to identify a developer, development team, or organization. You'll need a distribution certificate to deploy applications through the Apple App Store. If your team already has one and you want to use it, refer to. Then, skip straight to the section of this document. Note Don't forget to include the comma between the android and ios objects. IOS: Create the Deployment Package At this point, you're all ready to build the app to generate the package that you will submit to the app store for distribution.
On your Macintosh system, make sure that the remote agent is running. Refer to the TACO for details.
With the Cordova project open in Visual Studio, on the Standard toolbar, choose the iOS platform. Choose the Release build configuration. For execution target, select Remote Device. On the Build menu, choose Build Solution. This starts a build on the remotebuild agent and uses the distribution certificate and a newly generated provisioning profile to build a release signed iOS Application Archive (.ipa) file.
You can find the resulting file in the bin/iOS/Release folder of your project. IOS: Submit Your App to the App Store. Copy the application files onto a folder on your Mac. Follow Apple's procedures for submitting the app to the App Store. Windows Applications First, decide which platforms and device families you want to make your app available to. It doesn't matter which version of Windows the app targets. The Windows store accepts all of them.
That said, the operating system of a device or PC only runs apps that target the same version of that operating system or an earlier version. To learn more about Windows package and Windows device compatibility, see. Complete the following steps to package and deploy Windows applications:.
Modify App Settings As you prepare to publish your shiny new Cordova application, start in the application's configuration and make sure your settings for the application are correct. A Cordova app's settings are maintained in the project's config.xml file.
In the Visual Studio Solution Explorer, double-click the config.xml file to open the custom configuration editor shown in the following figure: The editor's Common tab contains general settings for your app; populate the fields in the form with the appropriate values for your application. The critical settings for any Cordova application are:. Display Name: the application's public name; this is the how the app will appear in the app store and on the target mobile device's home screen and application listing. Populate this field with a brief word or phrase that describes your app, keeping in mind that app tiles on a device's home screen don't leave much room for text. The value you enter here is added to the config.xml in the element. Package Name: the unique identifier for this application. Developers typically populate this field with a combination of the developer's company domain in plus the short name for the application.
The value you provide here is added to the widget element's id attribute as shown in the following example'. Domain Access: Manages a list of domains that the application can access; the values you enter here are added as access elements to the config.xml as shown in the following example: The purpose of most other settings clear from the title, but you can find more information about them here:. Windows-specific settings appear in the Windows tab of the configuration designer. You might have noticed that the this page shares three of the same field names as the Common page ( Display Name, Package Name, and Version).
In the Create App Package Wizard (which you'll use later) you might have to choose a different display name or package name because of Windows-specific naming requirements, the name has already been reserved by someone else, or if you want to associate your app with a name that you've previously reserved. Visual Studio will update the Windows page's Display Name and Package Name fields once you've completed the packaging process.
That way your other platform targets are not forced to use those names. The Version field is here because Windows uses a 4 digit version number rather than Cordova's standard 3 digit one. You can either modify this field directly or let Visual Studio set this field based on the version number that you choose in the packaging wizard. The Windows Target Version field only supports one option today, so you can ignore it. Package The Application.
In Visual Studio's Standard Toolbar, select the appropriate Windows target based on the target device processor: Windows-ARM for ARM devices, and Windows-x64 or Windows-x86 for Intel type processors. Choose Project - Store - Create App Packages to start the packaging wizard. For step-by-step guidance on the packaging process, see. The packaged application will be deployed to the target folder you selected in the Output location in packaging wizard. By default, it will use the AppPackages folder in the root of your project. Install your Windows app onto a device or publish it to the store To publish your app to the store, see. To install your app directly onto a device.