Pro Your skills of Gradle use in Android Studio
Changes in Android studio 3.0
Download 323.31 Kb.
|
- Bu sahifa navigatsiya:
- Configure Product Flavour
Changes in Android studio 3.0
Android studio 3.0 makes some changes in using dependencies as compile, testCompile is deprecated and new terms are coined read full details here The Java Library Plugin - Gradle User Guide Version 4.3.1 The Java Library plugin expands the capabilities of the Java plugin by providing specific knowledge about Java… docs.gradle.org Configure Product Flavour Their are some changes in product flavour read below post to continue https://developer.android.com/studio/build/build-variants.html#product-flavors Some common errors in gradle files Fix “Warning:Conflict with dependency” whenever using external libraries like Facebook, Paypal SDK etc these libraries also using some outdated support libraries like custom tabs or other than gradle shows error All libraries must use the exact same version specification. To resolve this issue you can check in the external library section which common library is using a different version. Like to fix issue with customtabs we have written below code configurations.all { resolutionStrategy.force "com.android.support:customtabs:$rootProject.ext.supportLibraryVersion" } 2) If 2+ libraries contain same files like DEPENDENCIES.txt,LICENSE.txt then you’ll get a build conflict error. Since you don’t need those files in your APK, the typical solution is to exclude them android { packagingOptions { exclude ‘META-INF/DEPENDENCIES.txt’ exclude ‘META-INF/LICENSE.txt’ exclude ‘META-INF/NOTICE.txt’ exclude ‘META-INF/NOTICE’ exclude ‘META-INF/LICENSE’ exclude ‘META-INF/DEPENDENCIES’ exclude ‘META-INF/notice.txt’ exclude ‘META-INF/license.txt’ exclude ‘META-INF/dependencies.txt’ exclude ‘META-INF/LGPL2.1’ exclude ‘META-INF/INDEX.LIST’ } } Download 323.31 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling