Tag: android-gradle

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 […]

Dagger 2, Gradle Plugins and Jack – Guidance Required

I’m using Dagger 2 (first time user of the DI library) with Android Studio (AS 2.1.2 – SDK 24), and obviously my first thought is “What dependencies do I need in order to use it?” Having looked at examples I can see that you need in the top level build.gradle file you need a annotation […]

External AndroidManifest.xml doesn't appear under project view pane

I have been developing an Android project using Android Studio and Gradle. My project’s AndroidManifest.xml is located under an external folder. I’m pointing to it using the following code in the build.gradle file: sourceSets { main { manifest.srcFile ‘..\\..\\..\\sources\\AndroidManifest.xml’ } } Everything works great, the project compiles and runs, except I can’t locate the AndroidManifest.xml […]

java.io.IOException: com.android.jack.api.v01.CompilationException: Failed to compile

Below is the error I am getting while migrating yo Java 8 with API Level 24 Looks like it’s from lombok pre-processor. Any help appreciated Error:/MyApp.native.android/AndroidApp/src/main/java/com/cba/MyApp/android/view/fragment/ProfileDetails/tabs/Profile.java:21: The import lombok cannot be resolved FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:AndroidApp:compileMyAppDebugJavaWithJack’. > java.io.IOException: com.android.jack.api.v01.CompilationException: Failed to compile * Try: […]

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