استوديو Android 2.0 (أبريل 2016)
ملاحظة: إذا كنت تطوّر تطبيقًا لمعاينة المطور من نظام التشغيل N، عليك استخدام الإصدار التجريبي 2.1 من "استوديو Android". لا يتوافق الإصدار 2.0 من استوديو Android مع جميع الميزات المطلوبة لاستهداف الإصدار التجريبي من نظام التشغيل N.
التشغيل الفوري:
- أصبح بإمكان "استوديو Android" الآن نشر عمليات إنشاء نظيفة بشكل أسرع من أي وقت مضى. بالإضافة إلى ذلك، أصبح من الممكن الآن إرسال تغييرات الرموز المتزايدة إلى المحاكي أو الجهاز الفعلي بشكل فوري تقريبًا. راجِع التحديثات بدون إعادة نشر إصدار مخصص لتصحيح الأخطاء الجديد أو، في كثير من الحالات، بدون إعادة تشغيل التطبيق.
<li>Instant Run supports pushing the following changes to a running app:
<ul>
<li>Changes to the implementation of an existing instance method or
static method
</li>
<li>Changes to an existing app resource
</li>
<li>Changes to structural code, such as a method signature or a static
field (requires a target device running API level 21 or higher).
</li>
</ul>
</li>
<li>Read the documentation to learn more <a href=
"/tools/building/building-studio.html#instant-run">about Instant
Run</a>.
<p class="note">
<strong>Note:</strong> Instant Run is supported only when you deploy the
debug build variant, use <a href=
"/tools/revisions/gradle-plugin.html#revisions">Android plugin for
Gradle version 2.0.0</a> or higher, and configure your app's module-level
<code>build.gradle</code> file for <code>minSdkVersion 15</code> or higher.
For the best performance, configure your app for <code>minSdkVersion
21</code> or higher.
</p>
</li>
إضافات جديدة إلى Lint:
- فحص عبارات
switchباستخدام أعداد صحيحة مشروحة@IntDefللتأكّد من معالجة جميع الثوابت. لإضافة أي عبارات ناقصة بسرعة، استخدِم القائمة المنسدلة الخاصة بإجراء النية واختَر إضافة ثوابت @IntDef الناقصة. - علامات لمحاولات غير صحيحة لاستخدام استيفاء السلسلة من أجل إدراج أرقام الإصدارات في الملف
build.gradle - علامات للفئات المجهولة التي توسّع الفئة
Fragment - علامات للرمز البرمجي الأصلي في مواقع غير آمنة، مثل المجلدَين
res/وasset/تشجّع هذه العلامة على تخزين الرمز البرمجي الأصلي في المجلدlibs/، والذي يتم بعد ذلك تجميعه بشكل آمن في المجلدdata/app-lib/الخاص بالتطبيق أثناء عملية التثبيت. AOSP: #169950 - علامات للمكالمات غير الآمنة إلى أرقام
Runtime.load()والمكالمات إلى أرقامSystem.load()AOSP: #179980 - ابحث عن أي موارد غير مستخدَمة وأزِلها من خلال النقر على Refactor (إعادة تصميم) > Remove Unused Resources (إزالة الموارد غير المستخدَمة) من شريط القوائم. تتيح ميزة رصد الموارد غير المستخدَمة الآن رصد الموارد التي تشير إليها الموارد غير المستخدَمة فقط، والمراجع في الملفات الأولية، مثل مراجع صور
.html، وسماتtools:keepوtools:discardالتي يستخدمها برنامج تصغير الموارد في Gradle، مع مراعاة مجموعات رموز المصدر غير النشطة (مثل الموارد المستخدَمة في إصدارات أخرى من الإصدارات) والتعامل بشكل صحيح مع عمليات استيراد الحقول الثابتة. - التحقّق من أنّ مراجع واجهة برمجة التطبيقات الضمنية متوافقة مع جميع المنصات التي يستهدفها
minSdkVersion - تشير إلى الاستخدام غير الملائم للرمزين
RecyclerViewوParcelable. - يتم الآن أيضًا التحقّق من عمليات الفحص
@IntDefو@IntRangeو@Sizeبحثًا عن مصفوفاتintومعلَمات متغيرة.
تحسينات إضافية:
- تم تحسينه ليتوافق مع الإصدار 2.0 من Android Emulator الذي يتميّز بسرعة أكبر من أي وقت مضى، ويتوافق مع مجموعة أكبر من الأجهزة الافتراضية، ويوفّر واجهة مستخدم محسّنة بشكل كبير. لمزيد من المعلومات حول المحاكي الجديد، يُرجى قراءة ملاحظات إصدار "أدوات حزمة تطوير البرامج (SDK)".
<li>Improvements to the <a href=
"/tools/devices/managing-avds.html">Android Virtual Device
Manager</a>:
<ul>
<li>System images are now categorized under the following tabs:
<em>Recommended</em>, <em>x86</em>, and <em>Other</em>.
</li>
<li>Under advanced settings, you can enable multi-core support and
specify the number of cores the emulator can use.
</li>
<li>Under advanced settings, you can determine how graphics are rendered
on the emulator by selecting one of the following options:
<ul>
<li>
<strong>Hardware:</strong> use you computer's graphics card for
faster rendering.
</li>
<li>
<strong>Software:</strong> use software-based rendering.
</li>
<li>
<strong>Auto:</strong> let the emulator decide the best option. This
is the default setting.
</li>
</ul>
</li>
</ul>
</li>
<li>Improved AAPT packaging times by specifying deploy target before the app
is built. This allows Android Studio to efficiently package only the
resources required by the specified device.
</li>
<li>Added Cloud Test Lab integration to provide on-demand app testing with
the convenience and scalability of a cloud service. Learn more about how you
can <a href="/training/testing/start/index.html#run-ctl">use Cloud
Test Lab with Android Studio</a>.
</li>
<li>Added a preview of the new <a class="external-link" href=
"//tools.android.com/tech-docs/gpu-profiler">GPU Debugger</a>. For graphics
intensive applications, you can now visually step through your OpenGL ES code
to optimize your app or game.
</li>
<li>Added Google App Indexing Test. Add support for URLs, app
indexing, and search functionality to your apps to help drive more
traffic to your app, discover which app content is used most, and attract
new users. Test and validate URLs in your app all within Android
Studio. See <a href=
"/tools/help/app-link-indexing.html">Supporting URLs and App
Indexing in Android Studio</a>.
</li>
<li>Upgrades from the latest IntelliJ 15 release, including improved code
analysis and performance. See <a class="external-link" href=
"https://www.jetbrains.com/idea/whatsnew">What's New in IntelliJ</a> for a
complete description of the new features and enhancements.
</li>
<li>XML editor auto-complete now adds quotations marks when completing
attributes. To check if this option is enabled, open the <b>Setting</b> or
<b>Preferences</b> dialogue, navigate to <b>Editor > General > Smart
Keys</b>, and check the box next to <b>Add quotes for attribute value on
attribute completion</b>. <a class="external-link" href=
"//b.android.com/195113">Issue: 195113</a>
</li>
<li>The XML editor now supports code completion for <a href=
"/topic/libraries/data-binding/index.html#layout_details">data binding</a>
expressions.
</li>