0Pricing
Kotlin Multiplatform Academy · درس

تشغيل تطبيق Android من Studio

إنشاء هدف Android ونشره على محاكي

تشغيل تطبيق Android من Studio درس مجاني في Kotlin Multiplatform Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Kotlin Multiplatform Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Android First, On Purpose

Your shared Kotlin is ready, so let's see it live. We start with Android because Android Studio drives the whole build, end to end. 🚀

Pick the androidApp Module

The run configuration you want is the one for the androidApp module. It bundles your shared code into a real installable app.

Choose a Device or Emulator

Next to the run button is the device picker. Select a connected phone or spin up an emulator image from the dropdown.

Create an Emulator Fast

No device handy? Open the Device Manager and create a virtual device. A recent Pixel with a modern API level is a safe default.

Press the Green Run Button

Hit the green Run arrow. Studio compiles the shared module, builds the APK, installs it, and launches the app for you.

Gradle Does the Heavy Lifting

Behind the scenes Gradle assembles the androidApp and pulls in your shared library as a normal dependency. Watch the Build tab for progress.

./gradlew :androidApp:installDebug

Shared Code Is Just a Library

On Android there is no special bridge. Your shared module compiles to JVM bytecode and is consumed like any other Kotlin dependency.

implementation(project(":shared"))

Watch the Logcat Window

Open Logcat to see runtime logs from both your app and shared code. It is your first stop when something behaves oddly.

Edit, Rerun, Repeat

Change shared logic, hit Run again, and Studio rebuilds only what changed. This tight loop keeps your feedback fast. ⚡

Build Failed? Read the Top Line

If the build stops, scroll to the first error in the Build tab. The earliest message usually points at the real cause.

You Just Shipped to a Device

Seeing your shared greeting on a real Android screen proves the wiring works. That confidence carries straight into the iOS run next.

Quick Check

Let's confirm how the Android build consumes your shared code.

Recap

You ran the app by picking androidApp, choosing a device, and pressing Run. Gradle built the shared module as a plain dependency and Logcat showed it working. 🎉

الأسئلة الشائعة

هل درس «تشغيل تطبيق Android من Studio» مجاني؟

نعم — نص درس «تشغيل تطبيق Android من Studio» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Kotlin Multiplatform Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.

ماذا ستتعلم في «تشغيل تطبيق Android من Studio»؟

إنشاء هدف Android ونشره على محاكي تتمرن على Kotlin Multiplatform Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Kotlin Multiplatform Academy؟

لا تُشترط خبرة سابقة. Kotlin Multiplatform Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «تشغيل تطبيق Android من Studio»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Kotlin Multiplatform Academy هذا؟

نعم. كل درس في Kotlin Multiplatform Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. تشغيل تطبيق Android من Studio
  2. فتح تطبيق iOS وتشغيله في Xcode
  3. كيفية إنشاء إطار iOS
  4. تصحيح مشكلات 'Shared Code Not Found'
← العودة إلى Kotlin Multiplatform Academy