C Programs Developed on Android and c Programs Developed on android

Source: Internet
Author: User

C Programs Developed on Android and c Programs Developed on android

If you do not have a dedicated Development Board, you can develop most C applications on your Android phone and compile the C compiler after installation. This article only writes a Hello World running process. Advantages:No eclipse, No Android source code, no Android. mk, no NDK. A c programmer can make good use of Android. A compiler and an adb are required to put the program into the Android system.

 

1. Install adb


Sudo apt-get install android-tools-adb


2. Install the cross tool chain


Sudo apt-get install gcc-arm-linux-gnueabi


3. Compile the hello world Program


Arm-linux-gnueabi-gcc hello. c-static


Note: This is a static link. Otherwise, the library file cannot be found.

4. Push a. out to Android


Adb push a. out/data/


5. Run Hello World


Adb shell/data/a. out


Result:


$ Adb shell/data/a. out

Hello World!

$

 

End:This is just a Hello World. In fact, many programs can be developed in this aspect, such as framebuffer or others. There are a lot of things to be familiar with and various tools to play with Android. If you only use one aspect, try to use as few as possible.


What programs can be developed in C Language Based on android platform?

Android has two directions: SDK-based development, mainly using JAVA, and NDK development. The main languages are C, C ++, C, C ++ can be used for third-party development in android, and there is a shortage of talents, mainly to localize some functions.

C language development for Android

Recently I am learning android to help you.
1. JAVA Development is the application part of Android
2. C/C ++ language development is the core of Android
The C language of Android actually refers to the development of the underlying Linux kernel of Android, which is useful when you are learning the C language of Linux. The underlying layer of Android is developed by Linux and implemented by Java virtual machines built on Linux.
Therefore, to learn how to develop Android C language, we suggest you read the explanation of the principles and key points of Android system. The content in this book is the underlying content and must be bought. However, the JAVA language must be viewed in part, because the C language driver still needs to be called by the JAVA Virtual Machine.
In addition, you need to pay attention to the following points for AndroidC language development:
1. purchase a Development Board or an open-source mobile phone to learn about the driver's operating mode and effective debugging.
2. You need to download the android source code because the C language is not used for Android SDK development.
3. android NDK development is actually implemented by calling some functions in C/C ++. It is recommended that you refer
4. You can refer to this website at the end, mostly about the underlying materials: bbs.starandroid.com/...ge#end

Suggestion:
1. JAVA depends on it.
2. It is recommended to develop the underlying Android hardware

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.