简体   繁体   中英

C++ or Java for android?

I am thinking about picking up android development in my free time. I see that development is possible in Java and C++ but the latter is limited.

I am much more comfortable with C++.

So my question is what limitations exist with C++ on Android? Will I be able to develop full apps with it, or will I eventually have to learn Java?

Pick the right tool for the job. The right tool for android is java, and occasionally c++ if it's really needed. Android runs on several different CPUs, and you'd be required to deal with fun stuff like compiling for platforms that you can't really test on - at least if you want to make apps for anyone but yourself.

It's all dependent on what you want to do, but the general rule of thumb:

C++ is for speed (for example games).

Java is for UI and general Android programming.

You cannot code an entire Android application using only C++, the android SDK is written in Java and that is what you will have to use.

This said you can still use C++ for heavy stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM