How to Use Sencha Touch to package Android APK

Source: Internet
Author: User

How to Use Sencha Touch to package Android APK
What is Sencha Touch?

Recently, the Ajax framework ExtJS compiled based on JavaScript integrated the existing ExtJS into JQTouch, Rapha? L library, launched the Sencha Touch framework for the cutting-edge Touch Web, the world's first HTML5-based Mobile App framework. Meanwhile, ExtJS was renamed Sencha, JQTouch founder David Kaneda, And Rapha? L has also joined the Sencha team. (From Bing Knows)

With Sencha Touch, you can quickly develop cross-platform mobile applications, regardless of Web, iOS, or Android.

Now, let's get started ......

Download Sencha Touch

Go to Sencha's official website to download the latest Sencha Touch version. Of course, you can also directly download the resources I uploaded to CSDN (no need to download points). The corresponding version number is 2.4.2. Transport: sencha-touch-2.4.2

After downloading and decompressing the package, you will get the following directories and files:

Directory: builds contains all the Framework Code files. After cmd, the file docs-related API documentation examples sample code will be used in Sencha Cmd. microloader is used to load the file resource of the application, including the style definition file and image file. and Other Resources src Source file: build. xml example release-notes.html example description senchalogo.png Sencha Logosencha-touch.js compressed Sencha Touch core library sencha-touch-all.js compressed Sencha Touch library sencha-touch-all-debug.js unzipped Sencha Touch library sencha-touch-debug.js for debugging unzipped Sencha Touch library for debugging sencha touchcore library setup.html official installation document version.txt version description
Download Sencha Cmd

Also in Sencha official can download to, of course, I still uploaded has been downloaded, the same does not need to download points, the portal: SenchaCmd-4.0.5.87

I will not go into details about the installation process.

To test whether the installation is successful, run the following command:

cd /Sencha

If the following information is displayed, the installation is successful.

Then you can start generating the application! <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4NCjxwcmUgY2xhc3M9 "brush: java;"> Sencha -sdk c:\touch-2.4.2 generate app App d:\App

C: \ touch-2.4.2 here is the location where you just placed touch. app: This is your app name. d: \ App, this is your app location.

The generated application cannot run. You need to package it. This is also the charm of Sencha Touch. You can package it into a Web page, iOS app, or Android app.

If you only need to deploy the website, enter the following command:

sencha app build

If you want to package it into a mobile app, you still need some steps.

Download Ruby

I uploaded Ruby as well. It took a lot of effort to upload these things to CSDN. The CSDN download topic is too bad. Portal: Portal

Click to install it. After installation, find the Start Command Prompt with Ruby application, similar to cmd.

Enter:

gem install compass

The background will start downloading Compass. As you are reading this blog, I will not remind you to download this file online ......

After the download is complete, enter the CD to the location of your application:

D:\App\sencha app build

It performs a series of deployment operations. You can see the displayed information.

Package APK

Open packager. json in the application directory, which is similar to a configuration file.

Make the following changes:

ApplicationName: Application name. You can change the application namespace of applicationId. For example, if the package name bundleSeedId is used in iOS, comment out the versionString application version number versionCode Application Generation number, for example, if the last one is 6.0.12, this one is the position of the inputPath outputPath application of the 6 icon application and the configuration of the application output path configuration, which is changed to Debug; releaseplatform can be packaged into the App Store with four optional types: iOSSimulator, iOS, AndroidEmulator, and AndroiddeviceType: iPhone, iPad, and Universal (for Android) certificatePath/certificateAlias/certificatePassword Certificate Book alias/certificate password provisionProfile Apple's configuration file ...... The key part of sdkPath is the android SDK location. Remember to use "\" as an escape! APILevel corresponding to androidAPILevel you have to download the SDK. the permission of the permissions application is the operation direction of the orientation application. The default value is four directions.

If you have not installed the SDK and JDK, please remember to install ......

Remember to configure the environment variables, and finally configure a system variable CLASSPATH. Save the following files in JDK. The path is for reference. If you find these two files, OK

……jdk\lib\dt.jar……jdk\lib\tools.jar

OK. You can start packaging!

In Start Command Prompt with Ruby, enter:

sencha app build native

Find the APK file in the output directory in packager. json.

In this way, our APK has been packaged and installed. What do you think? It should be interesting to use JS to write programs later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.