Building and testing Android applications in Quantum Visualizer requires two primary resources: Android SDK and Gradle. Gradle is an advanced build toolkit that manages dependencies and allows a developer to define custom build logic. This section describes how to install and configure these resources.
You are here: Configuring Your Computer > Install platform SDKs and their emulators > Android SDK and Emulator
Prerequisites that you need to download:
Kony Visualizer enables designers, developers and line-of-business to quickly build apps across channels – including web. Download for free › Rapid, visual assembly using pre-wired components, templates and sample apps for an 80% reduction in code.
For any queries you may have about installing Android SDKs and Android Studio, see Android SDK and Platform FAQs.
To build and view applications on the Android platform, do the following:
Download and install Android Studio
You must install Android Studio for building and testing Android applications using Quantum Visualizer. To download and install Android Studio, click Google Android Studio.
Download and unzip the Android SDK and support packages
Required SDKs and support packages can be optionally downloaded during the Android Studio installation process. If you have not downloaded the required SDKs during the Android Studio installation, you can download and install the Android Command line tools (stand-alone SDK tools) by doing the following:
To download and install the Android Command line tools and necessary support packages, do the following:
Known Issues:
Configure Quantum Visualizer to build for the Android platform
Now that you have installed the Android SDK, you need to configure Quantum Visualizer to recognize the Android platform.
To configure Quantum Visualizer to build for the Android platform, do the following:
Set the Android SDK Home Environment Variable
The following procedure is for the Windows environment, for the Mac, run the following command:
export ANDROID_HOME=/<installation location>
To set the Android SDK home environment variable, do the following:
Manually Set the Android Environment Variables
Under some circumstances, you might have to add the Android SDK environment variables manually. This is most commonly necessary if you installed Quantum Visualizer before installing the Android SDK. If you already had the Android SDK installed when you install Quantum Visualizer, Quantum Visualizer detects the presence of the Android SDK and adds the necessary environment variables automatically.
For more information, click the procedure you want.
Add Windows Android Environment Variables Manually
To manually set the Android environment variables for a Windows computer, do the following:
Add Mac Android Environment Variables Manually
To manually set the Android environment variables for a Mac computer, do the following:
Enable USB debugging on your Android Device
On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, do the following:
List Devices and View Logs
To List the Android devices connected to the Windows 10 PC, do the following:
To connect to an Android device on your Windows machine, do the following:
Configure an Android Emulator
Google has stopped supporting the standalone AVD manager and SDK Manager GUI tools, with latest Android SDK tools. When using, latest Android SDK tools >= 25.3.0, support for launching AVD Manager GUI to create android emulators and SDK manager to download missing components are deprecated from Quantum Visualizer V8 release. You must install Android Studio on your machine to get GUI to create and use Android emulators. Click here for more information.
Alternatively, you can use avdmanager command line utility to create the emulators. Refer https://developer.android.com/studio/command-line/avdmanager.html for avdmanager command usage.
When using older Android SDK tools( < 25.3.0), you still would be able to create and launch AVDs using AVD Manager and SDK Manager GUI Tools.
Launch the App Using Run on My Device or the Emulator Menu
There are two other options in this window that you can use.
Launch the App Post Successful Build
Limitations
Follow Gradle-related Changes for different Quantum Visualizer Versions
This section describes the various Gradle-related changes pertaining to different versions of Quantum Visualizer.
V8 SP2 Changes
V8 SP3 Changes
V8 SP4 Changes
Important Considerations
V9 Changes
V9 SP1 Changes
Important ConsiderationsResolve AAPT errors on Windows 8 machines
If you are using Windows 8 machines, you may run into AAPT issues. Follow these steps to resolve AAPT errors on Windows 8 machines:
If you view the alert message
Windows Update cannot check for updates, the service is not running , follow these steps to fix the error:
Limitation with 32-bit Architecture Support on Mac OS Catalina
While building an app, if the Support for 32-bit devices option is enabled, build issues may occur. For information on how to resolve these build issues, refer MacOS Catalina issues.
Heap size issue
Depending on the available RAM, you can increase the heap size of the Android build by adding any of the following entries in gradle.properties entries:
For more information, refer gradle entries.
Migration to AndroidX from android.support package
With the introduction of Android X packages, android.support is now deprecated.
All references to android.support made through NFIs, Android Manifest tag entries in Visualizer, Cordova and Reactnative entries must be replaced with androidx references manually, and the application must be rebuilt. This issue occurs due to an Android Build tools issue.
For more information on migration to AndroidX, click here. Deprecated widgets
If an app contains deprecated widgets, when a user tries to launch the app, an exception appears and the app does not launch.
NDK Version Compatibility Issue
When you install the latest V9SP1GA Quantum Visualizer or, if you have the Android plugin version 9.1, you may face the following build error.
What went wrong:
Execution failed for task ':stripDebugDebugSymbols'. No version of NDK matched the requested version 21.0.6113669. Versions available locally: 20.1.5948944 (or with different version) Kony Visualizer Enterprise Download For Mac Os
To overcome the issue, you must install the 21.0.6113669 version of the NDK using Android Studio.
After opening the SDK manager under the SDK Tools section, select the Show package details checkbox to list all NDK versions in Android Studio.
If your project does not require the NDK support, you can fix the issue by renaming or deleting the NDK bundle folder in Android. The path for the NDF folder is
ANDROID_HOME/ndk-bundle . ANDROID_HOME is the android sdk root folder.
Follow Gradle Recommendations
For using Gradle, you must go through the following sections:
Important: When you upgrade to Quantum Visualizer 8.2 and later, ensure that there are no conflicts in the dependencies of the build.gradle and libs folder. For example, appcompat-v7 added to the build.gradle is X version and if the same file is in the libs folder is of Y version. Due to differences in versions of the file, following build exceptions occur.
duplicate entry exception or com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex For more information on how to debug these type of conflicts, click here. General Recommendations
Build-related Recommendations
Build failures occur if there are any deviations from the Android-specified requirements. To build an understanding of how Android enforces its requirements, you can create a native application and test various scenarios. In creating such an app, you will want to be aware of the following:
Compilation Dependencies and Gradle Build Java Symbol Conflicts Resolution Methodology
If the build fails with the following exceptions and you do not know the root cause, following the debugging procedure provided here:
The debugging procedure for these build issues is as follows:
Note: To add additional entries in the build.gradle file, select the build.gradle entries to suffix option under the Gradle Entries tab in Application Properties. For more information on Gradle properties, click here.
Proxy-Related Build Recommendations
If your computer has proxy settings, you can alleviate build errors at the system level, and at the project level.
System-Level Proxy Recommendations
To address proxy-related build issues at the system level, you can either disable your computer's proxy settings, or create a gradle.properties file to your Gradle installation.
To create a gradle.properties file, do the following:
Project-Level Automated Recommendations
To automate project-level requirements, do the following:
Project-Level Manual Recommendations
To manually make the necessary changes at the project level, do the following:
Note: This needs to be done following each time you build the project
Packaging Error Build Recommendations
Android generates a packaging error if one or more JAR files have duplicate files or classes. To solve this issue, do one of the following:
Convert JPGs named as PNGs to the PNG Format
Gradle checks for PNG files while building your application. If a JPEG file in the folder is named as a PNG file (that is, the JPG has a .png extension) Gradle generates a build error. To avoid this issue, Quantum developed a Python script tool to check if the image files are correctly named. You can use this tool to convert the JPEG files to PNG.
To use the Python JPG conversion tool, do the following:
Common Issues with Gradle Migration
The following issues and errors can arise as a result of a Gradle migration.
Gradle Could not resolve com.android.tools.build:gradle:1.3.1
This condition can occur if there is no internet connection or when the system is being used when the proxy is not set. To resolve, set the proxy, or connect the computer to an internet connection.
Error: Gradle Wrapper not found in Android SDK
If you have been using Cordova applications in Visualizer and upgrade your Android SDK tools version to later than 25.2.5, when you build a project with Cordova support the Gradle Wrapper not found error occurs. Android removed Gradle wrapper package from the Android SDK tools version later than 25.2.5. As a result, Gradle wrapper does not exist in the Android SDK PATH and that results in the error.
To resolve, add Gradle to your path environment variable. For more information, refer to Gradle in Android Platform Guide.
Error: Unsupported type net, etc.
This condition can occur if the application is packing some internal files which are used in the android fwk, this would normally happen if the application is be packing *.xml which can be found in the following folder: ..resourcesresvalues To resolve, modify the XML files to change the custom tags net to string.
Duplicate Entry error
Occurs when the same .jar files are being added multiple times, or when different .jar files have the same classes. To resolve, remove the duplicate classes from .jar files.
Gradle OOM issue
To resolve, add javaMaxHeapSize (build.gradle), org.gradle.jvmargs(gradle.properties) values to the script. These are general options, which you can configure according to the needs of your app.
Peer not authenticated (proxy with https setting)
To resolve, download the local proxy server certificate and add it to the Java Key store.
Error: Could not create the Java Virtual Machine
Usually occurs when Gradle is not able to allocate the required memory to build the project, generally noticed on 32-bit computers. If the error occurs on a 64-bit computer, add javaMaxHeapSize (build.gradle), org.gradle.jvmargs (gradle.properties) values to the script. These are general options, which you can configure according to the needs of your app.
While designing screens for mobile/tablet applications, we must follow the best practices in Visualizer. As part of this newsletter we are going to showcase a few layout best practices which will help you design screens better, and for maximum reusability.
When a flex container has a set of widgets inside it in the horizontal manner, then the layout style should be Flow Horizontal and for the vertical the layout should be Flow Vertical. In the visualizer, for the flex container you can see the Layout type options i.e Flow Horizontal and Flow Vertical.
Kony Visualizer Enterprise Download For Mac Windows 7
In the below Hamburger menu the menu options are vertical , so the parent flex container layout is Flow Vertical and each menu option has an image and text , so each child flex container layout is Flow Horizontal.
If we are not sure about the length of the content in the widget then it’s recommended to use fixed width and preferred height. In the visualizer, for the segment you can see the width as fixed width i.e 100% and height as preferred height.
In the run time, whenever the news type is selected from the drop-down list then we are populating the news in the segment. Segment has a label with width as 100% and height as preferred. Observe that label height is growing based on the content.
Note: If we use label width as preferred width and preferred height then height will never be considered as shown below:
If you want to position the widget at center w.r.t parent container then it’s recommended that you use centerX and centerY, instead of left, right, top, and bottom. In the visualizer, flex container is center of the form and the button inside the flex container is also in the center. Flex container centerX and centerY are 50%, so it’s in the center of the form and button centerX and centerY are 50%, so it’s in the center of the flex container.
On the same form, for the same segment if we want to achieve different structures then it’s recommended to use different templates dynamically using the code. In the below example when the news type is sports the segment structure has three labels in each record. When the news type is world the same segment has a different structure i.e. it has two labels and one image. The below example segment is using two templates. Below is the code to change the template dynamically. If we want to change a template for a segment, in each row you need to add a key called template and the value should be the top flex container in the template.
In our example, for sports the top flex container in the template is flexSports so the code looks like this:
![]()
For world, the top flex container in the template is flexWorld so the code looks like
this:
Download Kony Visualizer
Kony Visualizer Enterprise Download
The % is suggested to be used to distribute the width of the child widgets in a Flex Container or when they are supposed to occupy the entire height/width of the parent container. In the below example the three buttons (ATM, Branch, and Both) have distributed the width of the flex container with % i.e 30% as shown below:
Kony Visualizer Enterprise Download MacSoft Input mode form property has to be set to Adjust Pan when a text box is used on the form so that the widgets are not misaligned. Below is the configuration in Visualizer. Each widget can be assigned a default widget style. When building a big application this saves a lot of time that would have been spent finding an existing skin and copying or assigning from the skins pallet or other widgets. Kony Visualizer Enterprise Download For Mac Osx
In Visualizer, we have two search boxes to search the files and the code.
Group your widgets into structural UI modules by using ctrl + select [Windows] or cmd + select [Mac] and right click to group them under a flex container or flex scroll container, so that it can be easy to move the UI block.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |