تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
أعلنّا في مؤتمر Google I/O لعام 2019 أنّ عملية تطوير Android ستكون في المقام الأول مع لغة Kotlin، ونحن ملتزمون بهذا الالتزام. تُعد Kotlin لغة برمجة معبرة وموجزة تقلل من أخطاء التعليمات البرمجية الشائعة
وتندمج بسهولة في التطبيقات الحالية. إذا كنت تريد إنشاء تطبيق Android، فننصحك بالبدء باستخدام Kotlin للاستفادة من أفضل ميزاته.
في محاولة لدعم تطوير Android باستخدام Kotlin، شاركنا في تأسيس
Kotlin Foundation
وأجرينا استثمارات مستمرة في تحسين أداء برامج التجميع وزيادة السرعة. لمعرفة المزيد من المعلومات حول التزام Android بتوفير Kotlin في المقام الأول، يمكنك الاطّلاع على التزام Android باستخدام Kotlin.
لماذا تركّز لغة Kotlin في المقام الأول على تطوير Android؟
لقد راجعنا الملاحظات الواردة مباشرةً من المطوّرين في المؤتمرات و"المجلس الاستشاري للعملاء" (CAB) وخبراء التطوير في Google (GDE) ومن خلال أبحاث المطوّرين التي أجريناها. يستمتع العديد من المطورين بالفعل باستخدام Kotlin، وكان طلب
المزيد من الدعم لـ Kotlin واضحًا. إليك ما يقدره المطورون بشأن
الكتابة في Kotlin:
معبِّر وموجز: يمكنك تنفيذ المزيد من المهام بأقل الإمكانيات. عبِّر عن أفكارك وقلل من كمية
الرموز النموذجية. 67% من مطوّري البرامج المحترفين الذين يستخدمون لغة
Kotlin يقولون إنّ هذه اللغة قد ازدادت إنتاجيتهم.
رمز أكثر أمانًا: تحتوي لغة Kotlin على العديد من ميزات اللغة لمساعدتك في تجنُّب أخطاء البرمجة الشائعة، مثل استثناءات المؤشر الفارغ.
تقل احتمالية تعطُّل تطبيقات Android التي تحتوي على رمز Kotlin بنسبة% 20.
إمكانية التشغيل التفاعلي: يمكنك طلب رمز برمجي مستند إلى Java من Kotlin أو طلب لغة البرمجة Kotlin من
رمز برمجي يستند إلى Java. تتميز Kotlin بأنها قابلة للتشغيل التفاعلي بنسبة 100% مع لغة برمجة Java،
لذا يمكنك الاحتفاظ بالقدر الذي تريده من لغة Kotlin في مشروعك
بحسب ما تريد.
التزامن المنظَّم: تجعل الكوروتينات في لغة Kotlin التعليمة البرمجية غير المتزامنة سهلة الاستخدام كرمز برمجي للحظر. تعمل الكوروتينات على تبسيط إدارة المهام في الخلفية بشكل كبير
لكل شيء بدءًا من مكالمات الشبكة إلى
الوصول إلى البيانات المحلية.
ما المقصود بلغة Kotlin-first؟
عند إنشاء أدوات ومحتوى جديد لتطوير Android، مثل مكتبات Jetpack والنماذج والوثائق ومحتوى التدريب، سنصمّمها مع وضع مستخدمي Kotlin في الاعتبار مع مواصلة توفير الدعم لاستخدام واجهات برمجة التطبيقات من لغة البرمجة Java.
لغة Java
Kotlin
دعم حزمة تطوير البرامج (SDK) للنظام الأساسي
نعم
نعم
دعم "استوديو Android"
نعم
نعم
أداة Lint
نعم
نعم
دعم المستندات الإرشادية
نعم
نعم
دعم مستندات واجهة برمجة التطبيقات
نعم
نعم
دعم AndroidX
نعم
نعم
واجهات برمجة التطبيقات الخاصة بـ AndroidX Kotlin (KTX، الكوروتينات، وما إلى ذلك)
يتمتع مهندسونا بالميزات اللغوية التي تقدمها لغة Kotlin، واليوم تم تصميم ما يزيد عن 70 تطبيقًا من Google باستخدام Kotlin. ويتضمن ذلك تطبيقات مثل "خرائط Google" و"الصفحة الرئيسية"
وPlay وDrive و"الرسائل". وأحد الأمثلة على النجاح يأتي من فريق Google Home، حيث أسهم إطلاق عملية تطوير ميزات جديدة إلى Kotlin في تقليل حجم قاعدة الرموز بنسبة 33% وانخفاض بنسبة 30% في عدد أعطال NPE.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Android’s Kotlin-first approach\n\nAt Google I/O 2019, we announced that Android development will be\nincreasingly Kotlin-first, and we've stood by that commitment. Kotlin is an\nexpressive and concise programming language that reduces common code errors\nand easily integrates into existing apps. If you're looking to build an\nAndroid app, we recommend starting with Kotlin to take advantage of its\nbest-in-class features.\n\nIn an effort to support Android development using Kotlin, we co-founded the\n[Kotlin Foundation](https://kotlinlang.org/foundation/kotlin-foundation.html)\nand have ongoing investments in improving compiler performance and build\nspeed. To learn more about Android's commitment to being Kotlin-first, see\n[Android's commitment to Kotlin](https://android-developers.googleblog.com/2019/12/androids-commitment-to-kotlin.html).\n\nWhy is Android development Kotlin-first?\n----------------------------------------\n\nWe reviewed feedback that came directly from developers at conferences, our\nCustomer Advisory Board (CAB), Google Developer Experts (GDE), and through\nour developer research. Many developers already enjoy using Kotlin, and the\nrequest for more Kotlin support was clear. Here's what developers appreciate\nabout writing in Kotlin:\n\n- **Expressive and concise:** You can do more with less. Express your ideas and reduce the amount of boilerplate code. 67% of professional developers who use Kotlin say Kotlin has increased their productivity.\n- **Safer code:** Kotlin has many language features to help you avoid common programming mistakes such as null pointer exceptions. Android apps that contain Kotlin code are 20% less likely to crash.\n- **Interoperable:** Call Java-based code from Kotlin, or call Kotlin from Java-based code. Kotlin is 100% interoperable with the Java programming language, so you can have as little or as much of Kotlin in your project as you want.\n- **Structured Concurrency:** Kotlin coroutines make asynchronous code as easy to work with as blocking code. Coroutines dramatically simplify background task management for everything from network calls to accessing local data.\n\nWhat does Kotlin-first mean?\n----------------------------\n\nWhen building new Android development tools and content, such as Jetpack\nlibraries, samples, documentation, and training content, we will design\nthem with Kotlin users in mind while continuing to provide support for\nusing our APIs from the Java programming language.\n\n| | Java language | Kotlin |\n|------------------------------------------------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| Platform SDK support | Yes | Yes |\n| Android Studio support | Yes | Yes |\n| Lint | Yes | Yes |\n| Guided docs support | Yes | Yes |\n| API docs support | Yes | Yes |\n| AndroidX support | Yes | Yes |\n| AndroidX Kotlin-specific APIs (KTX, coroutines, and so on) | N/A | Yes |\n| Online training | Best effort | Yes |\n| Samples | Best effort | Yes |\n| Multi-platform projects | No | Yes |\n| Jetpack Compose | No | Yes |\n| Compiler plugin support | No | Yes - The [Kotlin Symbol Processing API](https://github.com/google/ksp) was created by Google to develop lightweight compiler plugins. |\n\nWe use Kotlin, too!\n-------------------\n\nOur engineers enjoy the language features Kotlin offers, and today over 70 of\nGoogle's apps are built using Kotlin. This includes apps like Maps, Home, Play,\nDrive, and Messages. One example of success comes from the\n[Google Home team](/stories/apps/google-home), where migrating new feature\ndevelopment to Kotlin resulted in a 33% reduction in codebase size and a 30%\nreduction in the number of NPE crashes.\n\nTo learn more about Kotlin on Android, see the\n[Kotlin on Android FAQ](/kotlin/faq)."]]