Câu hỏi phỏng vấn Android
Câu hỏi

What is the difference between compileSdkVersion and targetSdkVersion ?

Câu trả lời

The main difference between compileSdkVersion and targetSdkVersion in Android development is:

  • compileSdkVersion specifies the version of the Android SDK used to compile your app. It determines which Android APIs and features you can use in your code[1][2][4]. Setting it to the latest version allows you to leverage the newest functionality, but your app may not run on older devices[2].

  • targetSdkVersion indicates the highest Android version your app has been designed and tested for[1][2][4]. It tells the system how to behave when running your app on newer Android versions. Setting it to the latest version ensures your app takes advantage of improvements and bug fixes, but you must thoroughly test for compatibility[2][4].

In summary:

  • compileSdkVersion controls the APIs available to your code
  • targetSdkVersion specifies the Android version your app targets
  • ...
middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What is the Android NDK? How can one use it? Why should one use it?

middle

What is an Android PendingIntent ?

middle

When to use Android's ArrayMap instead of a HashMap ?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào