"Android native app" alarm app

Source: Internet
Author: User

Having been exposed to Android for a while, and having some understanding of development, the idea of using Android native apps for analysis and learning has sprouted. Let's start with the alarm app.

1. First download the native application, native application in the native system (of course you have to download the original system, the process please Baidu).

The catalogue is as follows: Packages\apps, all the native basic applications are in this, we go into the Deskclock directory and build it as a project.

This time will be error, according to the error message is due to lack of jar package recent, Datetimepicker.jar, Android-support-v13.jar, below we look for two jar package.

2. Increase the jar package for Deskclock project

2.1 Datetimepicker.jar

The jar package is compiled with native code, so in the Internet to find the basic is not found, I was looking for a few days have not found. Can't find what to do, can only be compiled by themselves.

Search DateTimePicker found his address: \frameworks\opt\datetimepicker, open a look is also a project. Now we just need to compile the project into a jar package.

How do I compile a project into a jar package? Engineering-->properties-->android-->is liberary to tick. It is also important to note that DateTimePicker needs to refer to Android-support-vx.jar, which must refer to the higher version, such as version 13, which is explained later.

With the jar package, we reference the jar package to Deskclock, and there is a lot less error.

2.2 Android-support-v13.jar

Since it was also found to be less android-support-v4.jar Android-support-v13.jar packages, it is possible to refer to a later version of the 13 version.

After referencing the jar package of 13, did you find that the error was not good?

Start compiling ...

Error:

Unable to execute Dex:multiple Dex files define Landroid/support/v13/app/fragmentcompat$fragmentcompatimpl;
Conversion to Dalvik format failed:unable to execute dex:multiple Dex files define Landroid/support/v13/app/fragmentcomp At$fragmentcompatimpl;

The error in the report is multiple Dex file definition issues, with two v13 in the folder.

What is this for? Remember we also quoted V13 in DateTimePicker, the jar contained in the referenced jar project file does not have to be repeated references, otherwise it will be an error.

How to solve the problem? Remove V13 This package, recompile, everything is OK.

First compile native application so Easyand happy end, next time talk about the native alarm clock parsing it.

"Android native app" alarm app

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.