সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অ্যান্ড্রয়েড গ্রেডল প্লাগইন 3.1.0 (মার্চ 2018)
অ্যান্ড্রয়েড প্লাগইনের এই সংস্করণটির জন্য নিম্নলিখিতগুলি প্রয়োজন:
| ন্যূনতম সংস্করণ | ডিফল্ট সংস্করণ | নোট |
---|
গ্রেডল | 4.4 | 4.4 | আরও জানতে, Gradle আপডেট করা দেখুন। |
SDK বিল্ড টুলস | 27.0.3 | 27.0.3 | SDK বিল্ড টুল ইনস্টল বা কনফিগার করুন । মনে রাখবেন, android.buildToolsVersion প্রপার্টি ব্যবহার করে বিল্ড টুলের জন্য আপনাকে আর কোনো সংস্করণ নির্দিষ্ট করতে হবে না—প্লাগইনটি ডিফল্টরূপে ন্যূনতম প্রয়োজনীয় সংস্করণ ব্যবহার করে। |
নতুন DEX কম্পাইলার, D8
ডিফল্টরূপে, অ্যান্ড্রয়েড স্টুডিও এখন D8 নামে একটি নতুন DEX কম্পাইলার ব্যবহার করে। ডেক্স কম্পাইলেশন হল অ্যান্ড্রয়েড রানটাইম (অথবা ডালভিক, অ্যান্ড্রয়েডের পুরোনো সংস্করণের জন্য) .class
বাইটকোডকে .dex
বাইটকোডে রূপান্তরিত করার প্রক্রিয়া। পূর্ববর্তী কম্পাইলারের তুলনায়, যাকে DX বলা হয়, D8 দ্রুত কম্পাইল করে এবং ছোট DEX ফাইলগুলিকে আউটপুট করে, যখন একই বা ভাল অ্যাপ রানটাইম কার্যক্ষমতা থাকে।
D8 আপনার প্রতিদিনের অ্যাপ ডেভেলপমেন্ট ওয়ার্কফ্লো পরিবর্তন করবে না। যাইহোক, যদি আপনি নতুন কম্পাইলার সম্পর্কিত কোনো সমস্যা অনুভব করেন, অনুগ্রহ করে একটি বাগ রিপোর্ট করুন । আপনি অস্থায়ীভাবে D8 অক্ষম করতে পারেন এবং আপনার প্রকল্পের gradle.properties
ফাইলে নিম্নলিখিতগুলি অন্তর্ভুক্ত করে DX ব্যবহার করতে পারেন:
android.enableD8=false
জাভা 8 ভাষার বৈশিষ্ট্যগুলি ব্যবহার করে এমন প্রকল্পগুলির জন্য, ডিফল্টরূপে বর্ধিত ডিসুগারিং সক্ষম করা হয়। আপনি আপনার প্রকল্পের gradle.properties
ফাইলে নিম্নলিখিত উল্লেখ করে এটি নিষ্ক্রিয় করতে পারেন:
android.enableIncrementalDesugaring=false.
ব্যবহারকারীদের পূর্বরূপ দেখুন: আপনি যদি ইতিমধ্যেই D8-এর একটি পূর্বরূপ সংস্করণ ব্যবহার করছেন, তাহলে মনে রাখবেন যে এটি এখন SDK বিল্ড টুলে অন্তর্ভুক্ত লাইব্রেরিগুলির সাথে কম্পাইল করে — JDK নয়। সুতরাং, আপনি যদি JDK-এ বিদ্যমান API গুলি অ্যাক্সেস করেন তবে SDK বিল্ড টুল লাইব্রেরিতে নয়, আপনি একটি কম্পাইল ত্রুটি পাবেন।
আচরণ পরিবর্তন
একাধিক APK তৈরি করার সময় যেগুলি প্রত্যেকটি আলাদা ABI কে লক্ষ্য করে, ডিফল্টরূপে নিম্নলিখিত ABIগুলির জন্য আর APK তৈরি করে না: mips
, mips64
, এবং armeabi
.
আপনি যদি এই ABI গুলিকে টার্গেট করে এমন APK তৈরি করতে চান, তাহলে আপনাকে অবশ্যই NDK r16b বা তার কম ব্যবহার করতে হবে এবং আপনার build.gradle
ফাইলে ABIs উল্লেখ করতে হবে, যেমনটি নীচে দেখানো হয়েছে:
splits {
abi {
include 'armeabi', 'mips', 'mips64'
...
}
}
splits {
abi {
include("armeabi", "mips", "mips64")
...
}
}
অ্যান্ড্রয়েড প্লাগইনের বিল্ড ক্যাশে এখন 30 দিনের বেশি পুরানো ক্যাশে এন্ট্রিগুলিকে উচ্ছেদ করে৷
resConfig
এ "auto"
পাস করা আর আপনার APK-এ প্যাকেজ করার জন্য স্বয়ংক্রিয়ভাবে স্ট্রিং সংস্থান বাছাই করে না। আপনি যদি "auto"
ব্যবহার করা চালিয়ে যান, তাহলে প্লাগইনটি আপনার অ্যাপ এবং এর নির্ভরতা প্রদানকারী সমস্ত স্ট্রিং সংস্থান প্যাকেজ করে। সুতরাং, আপনার পরিবর্তে প্রতিটি লোকেল নির্দিষ্ট করা উচিত যা আপনি প্লাগইনটিকে আপনার APK এ প্যাকেজ করতে চান।
যেহেতু স্থানীয় মডিউলগুলি আপনার অ্যাপের পরীক্ষার APK-এর উপর নির্ভর করতে পারে না, তাই androidTestApi
কনফিগারেশন ব্যবহার করে androidTestImplementation
এর পরিবর্তে আপনার যন্ত্রযুক্ত পরীক্ষাগুলিতে নির্ভরতা যোগ করার ফলে, Gradle নিম্নলিখিত সতর্কতা জারি করে:
WARNING: Configuration 'androidTestApi' is obsolete
and has been replaced with 'androidTestImplementation'
WARNING: Configuration 'androidTestApi' is obsolete
and has been replaced with 'androidTestImplementation'
সংশোধন করে
- একটি সমস্যা সমাধান করে যেখানে অ্যান্ড্রয়েড স্টুডিও যৌগিক বিল্ডগুলিতে নির্ভরতা সঠিকভাবে চিনতে পারে না।
- একটি একক বিল্ডে একাধিকবার অ্যান্ড্রয়েড প্লাগইন লোড করার সময় আপনি একটি প্রজেক্ট সিঙ্ক ত্রুটি পেয়েছিলেন এমন একটি সমস্যা সমাধান করে–উদাহরণস্বরূপ, যখন একাধিক সাবপ্রজেক্ট প্রতিটি তাদের বিল্ডস্ক্রিপ্ট ক্লাসপাথে অ্যান্ড্রয়েড প্লাগইন অন্তর্ভুক্ত করে।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","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-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["\u003cbr /\u003e\n\nAndroid Gradle Plugin 3.1.0 (March 2018)\n\nThis version of the Android plugin requires the following:\n\n| | Minimum version | Default version | Notes |\n|----------------:|:---------------:|:---------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| Gradle | 4.4 | 4.4 | To learn more, see [updating Gradle](/build/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle). |\n| SDK Build Tools | 27.0.3 | 27.0.3 | [Install](/studio/intro/update#sdk-manager) or [configure](/tools/releases/build-tools) SDK Build Tools. Keep in mind, you no longer need to specify a version for the build tools using the android.buildToolsVersion property---the plugin uses the minimum required version by default. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nNew DEX compiler, D8\n\nBy default, Android Studio now uses a new DEX compiler called D8. DEX\ncompilation is the process of transforming `.class` bytecode into\n`.dex` bytecode for the Android Runtime (or Dalvik, for older\nversions of Android). Compared to the previous compiler, called DX, D8\ncompiles faster and outputs smaller DEX files, all while having the same or\nbetter app runtime performance.\n\nD8 shouldn't change your day-to-day app development workflow. However, if\nyou experience any issues related to the new compiler, please\n[report a bug](/studio/report-bugs). You can temporarily\ndisable D8 and use DX by including the following in your project's\n`gradle.properties` file: \n\n android.enableD8=false\n \nFor projects that\n[use Java 8 language features](/studio/write/java8-support),\nincremental desugaring is enabled by default. You can disable it by\nspecifying the following in your project's `gradle.properties` file: \n\n android.enableIncrementalDesugaring=false.\n \n\n**Preview users:** If you're already using a preview version of D8, note\nthat it now compiles against libraries included in the\n[SDK build tools](/studio/releases/build-tools)---not the JDK.\nSo, if you are accessing APIs that exist in the JDK but not in the SDK build\ntools libraries, you get a compile error.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nBehavior changes\n\n- When building multiple APKs that each target a different ABI, the\n no longer generates APKs for the following ABIs by default:\n `mips`, `mips64`, and `armeabi`.\n\n If you want to build APKs that target these ABIs, you must use\n [NDK r16b or lower](/ndk/downloads/revision_history) and\n specify the ABIs in your `build.gradle` file, as shown below: \n\n ```groovy\n splits {\n abi {\n include 'armeabi', 'mips', 'mips64'\n ...\n }\n }\n \n ``` \n\n ```kotlin\n splits {\n abi {\n include(\"armeabi\", \"mips\", \"mips64\")\n ...\n }\n }\n \n ```\n- The Android plugin's [build\n cache](/studio/build/build-cache) now evicts cache entries that are older than 30 days.\n\n- Passing `\"auto\"` to\n [`resConfig`](https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ProductFlavor.html#com.android.build.gradle.internal.dsl.ProductFlavor:resConfig(java.lang.String))\n no longer automatically picks string resources to package into your APK.\n If you continue to use `\"auto\"`, the plugin packages all string\n resources your app and its dependencies provide. So, you should instead\n specify each locale that you want the plugin to package into your APK.\n\n- Because local modules can't depend on your app's test APK, adding\n dependencies to your instrumented tests using the\n `androidTestApi` configuration, instead of\n `androidTestImplementation`, causes Gradle to issue the\n following warning:\n\n ```groovy\n WARNING: Configuration 'androidTestApi' is obsolete\n and has been replaced with 'androidTestImplementation'\n \n ``` \n\n ```kotlin\n WARNING: Configuration 'androidTestApi' is obsolete\n and has been replaced with 'androidTestImplementation'\n \n ```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nFixes\n\n- Fixes an issue where Android Studio doesn't properly recognize dependencies in composite builds.\n- Fixes an issue where you get a project sync error when loading the Android plugin multiple times in a single build--for example, when multiple subprojects each include the Android plugin in their buildscript classpath.\n\n\u003cbr /\u003e"]]