android-gradle

Multiple signingConfigs for multiple variants

好久不见. 提交于 2019-11-29 02:07:56
How can I set different signing configs for different variants? For instance, we currently have the buildtypes Debug/Beta/Release with 2 flavors, free and paid, resulting in 6 variants. To make it a bit easier, let's forget the Debug variants and only focus on freeBeta/paidBeta/freeRelease/paidRelease. What I'd like, is for each variant to use a separate different signingConfig. So far the only solutions I could find is either putting the signingConfigs in the buildTypes so all Beta variants would have the same signingConfigs: buildTypes { beta { signingConfigs.beta } release { signingConfigs

Gradle exclude arm64 libs

好久不见. 提交于 2019-11-29 02:04:25
I have an application including two libraries, where both of them have dependencies on native libraries. Both are included using gradle so the structure looks like this: MyApp - Libary1 -- x86, armeabi native libs - Library2 -- Library3 --- x86, armeabi, arm64-v8a I want to remove the arm64 support as i would also need that *.so for Library1, which i don't have. (so currently i get an UnsatisfiedLinkError on arm64 devices) I already tried this: (with abiFilters "armeabi", "x86") https://stackoverflow.com/a/30799825/3325222 But i still get the arm64 folder and *.so files in my apk... is there

Unable to add AndEngine to Android Studio

痞子三分冷 提交于 2019-11-29 01:51:29
I am trying to almost 2 days to add AndEngine to Android Studio but unable to do so. I tried the following two methods, neither worked. 1st Try I download the AndEngine code from GitHub Link -- this is NOT a Gradle Project and tried to add it to my Android Studio build.gradle and settings.gradle, but i get this error, my screenshot: https://postimg.cc/image/5mcvpvsar/ (I think I am getting this error because AndEngine is not a gradle project - HOW TO MAKE IT A GRADLE PROJECT??) 2nd Try I have also tried adding the andengine.jar (file I just googled for) in /libs folder and do right-click -->

Receiving a build error when upgrading to gradle 3.3 and android build tools 2.3.0

拈花ヽ惹草 提交于 2019-11-29 01:50:07
I just updated my build files Gradle from 2.14.1 to 3.3 Android Plugin from 2.2.3 to 2.3.0 I am receiving the following error. Seems like some thirdparty plugin issue. Can anyone shed light to it? I cant find anything in change logs related to this change. A problem occurred configuring project ':apis'. Failed to notify project evaluation listener. The "android" command is no longer included in the SDK. Any references to it (e.g. by third-party plugins) should be removed. The build file in which error is thrown looks something like this apply plugin: 'android-sdk-manager' apply plugin: 'com

Error:Cannot configure the 'publishing' extension after it has been accessed

拟墨画扇 提交于 2019-11-29 01:34:43
Error:Cannot configure the 'publishing' extension after it has been accessed. I am getting this error after updating my android studio. this is my app.gradle apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion '23.0.2' defaultConfig { minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" vectorDrawables.useSupportLibrary = true generatedDensities = [] } aaptOptions { additionalParameters "--no-version-vectors" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), proguard-rules.pro' } }

Could not find property 'processManifest' on com.android.build.gradle.internal.api.ApplicationVariantImpl

折月煮酒 提交于 2019-11-29 01:17:34
I am currently trying to update Android Studio to 1.0.0-RC. This seems to require gradle Android plugin 1.0.0-rc1. After the update, I started having the following error: `Could not find property 'processManifest' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@b9da89c.` With some digging, it seems that processManifest is one of the deprecated properties that were removed in 0.14.3 version . Any idea what the new property name is? The same user guide has not been updated for the new version, so I can't find any documentation for it. EDIT: Here is the code that needs

Android Studio: Failed to find: 'com.android.support:support-v4:19.1.0'

瘦欲@ 提交于 2019-11-29 01:03:46
I want to build an app in Android Studio with the support library but I get the following error when adding the dependency for the support library: Error:Failed to find: com.android.support:support-v4:19.1.0 Here is my build.gradle file apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion '20' defaultConfig { applicationId "sample.myapplication" minSdkVersion 15 targetSdkVersion 19 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies {

Android X: tools:replace specified at line: for attribute, but no new value specified

冷暖自知 提交于 2019-11-29 00:55:41
I have tried many solutions on this website but still, the problem is not solved. The issue is due to Android X library. When I added Android X, this issue was resolved but it opened up new issue. How to fix this issue? Earlier this error was coming: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools

The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin

ε祈祈猫儿з 提交于 2019-11-29 00:50:25
I updated the AndroidStudio to version 3.1 Clean Project... and build failed The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin. Perhaps you misspelled something? However, the 3.0.1 version of AndroidStudio does not have this problem Detailed log: org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':ios_dialog_lib'. at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94) at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate

Android Studio 2.1 Error converting bytecode to dex

我的梦境 提交于 2019-11-28 23:43:11
I am getting the following error since I updated the android studio from 2.0 to 2.1. Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. I tried adding the following snippet in build.gradle, but still the issue persists compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion