Tag: android-gradle

Butterknife 8.4.0 – Plugin with id 'android-apt' not found

I keep getting the error Plugin with id ‘android-apt’ not found. What’s going wrong here? plugins { id “me.tatarka.retrolambda” version “3.2.5” } apply plugin: ‘com.android.application’ apply plugin: ‘android-apt’ android { compileSdkVersion 24 buildToolsVersion ‘23.0.3’ dexOptions { javaMaxHeapSize “6g” } defaultConfig { applicationId “com.yitter.android” minSdkVersion 15 targetSdkVersion 24 multiDexEnabled true // Enabling multidex support. renderscriptTargetApi 23 […]

Error in generated values-23 file in Android

I am getting this error when I try to build my project. Error:(3, 5) No resource found that matches the given name (at ‘cardBackgroundColor’ with value ‘?android:attr/colorBackgroundFloating’). Error:Execution failed for task ‘:app:processDebugResources’. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Home\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe” finished with non-zero exit value 1 And when I click on it it takes me to the v-23 […]

Set a global variable in gradle that can use in manifest file

I want to create a global variable similar with applicationId. It is set value in build.gradle and will be used in manifest. Is it possible?

How to set my gradle for final release apk

Earlier my gradle was like this: WHICH IS OFCOURSE INCORRECT apply plugin: ‘android’ android { compileSdkVersion 19 buildToolsVersion ‘19.0.3’ defaultConfig { minSdkVersion 11 targetSdkVersion 19 versionCode 1 versionName “1.0” } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.txt’ } } } dependencies { compile ‘com.android.support:gridlayout-v7:19.0.1’ compile ‘com.android.support:appcompat-v7:+’ compile fileTree(dir: ‘libs’, include: [‘*.jar’]) compile ‘com.android.support:support-v4:+’ […]

Error running react-native run-android –variant=release (Task 'installReleaseDebug' not found in root project 'gnosisapp'.)

I’m having this error trying to do react-native run-android –variant=release Starting JS server… Running /home/sonic182/Android/platform-tools/adb -s ZY2232QD4K reverse tcp:8081 tcp:8081 Building and installing the app on the device (cd android && ./gradlew installReleaseDebug)… FAILURE: Build failed with an exception. * What went wrong: Task ‘installReleaseDebug’ not found in root project ‘gnosisapp’. * Try: Run gradlew […]

How can Variant Outputs be manipulated using the Android Gradle Plugin 3.0.0+?

The latest version (3.0.0) of the Android Plugin for Gradle has broken its API for manipulating Variant Outputs. This API was used for manipulating files creating during builds (such as AndroidManifest.xml), and has been removed to improve configuration times. What new APIs are available to manipulate Variant Outputs, and how do they differ to the […]

Rename output file in the new Android Plugin 3.0.0-alpha1

I was using this in the previous gradle plugin and it was working fine. applicationVariants.all { v -> v.outputs.each { output -> output.outputFile = new File( output.outputFile.parent, output.outputFile.name.replace(“app-release.apk”, “companyName-app-v${variant.versionName}.apk”)) }} With the recent update to 3.0.0-alpha1 it shows error. I read the link https://developer.android.com/studio/preview/features/new-android-plugin-migration.html but was unable to find the exact source of error. Is […]

Duplicate WebRTC class in android

I’m getting these errors in my android app and here is the LogCat. > Error:Execution failed for task > ‘:android:transformClassesWithJarMergingForDebug’. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: > org/webrtc/voiceengine/WebRtcAudioRecord.class I am trying to integrate a second WebRTC to my android app, I have integrated TokBox jar in my project and now I’m trying to put VSee SDK […]

Gradle 4.0 Unable to find a matching configuration

I am trying to open my existing project in new Android Studio 3.0 canary 2. I updated Gradle according to instructions, changed names for dependency configurations but I continue to get next error: Error:Could not resolve all dependencies for configuration ‘:bankOK:betaNewApiInnerTestRuntimeClasspath’. > Unable to find a matching configuration in project :abChat: – Configuration ‘debugApiElements’: – […]

Build works in debug, fails in release – ZipException duplicate entry

I am upgrading an application from 2.3 to Nougat (SDK 25). When I add com.android.support:appcompat-v7:25.0.0 in order to support ActivityCompat.requestPermissions. When I run this in debug mode, the applicaiton runs without issues, but running with ./gradlew assembleDebug causes the following error: Error:Execution failed for task ‘:transformClassesWithJarMergingForDebug’. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/hardware/display/DisplayManagerCompat.class When I run […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.