Questions tagged [android-gradle]

0

votes
0

answer
16

Views

Resources$NotFoundException thrown after updating Gradle Plugin to 3.4.0

I have a project with multiple modules, and after updating to Gradle Plugin 3.4.0 and Gradle 5.1.1, everything else seems to work OK, but the module for Espresso tests crashes immediately when trying to run the tests: android.content.res.Resources$NotFoundException: Drawable com.example.foo:dimen/ac...
manabreak
1

votes
2

answer
1k

Views

Failed to resolve: support-media-compat Open File

After upgrading the code, I am getting an error 'Failed to resolve: support-media-compat Open File'. The supportlib_version is 27.1.1
Droid Genie
2

votes
2

answer
248

Views

Duplicate classes from androidx and com.android.support

I recently updated my Android Studio (and I'm pretty sure the Gradle version), and now I've been getting a bunch of errors when trying to compile my project. Here's the one that is plaguing me at the moment: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar...
TheKingElessar
1

votes
1

answer
57

Views

Where does the external library, downloaded by gradle, get stored in an Android project?

I need to modify the source code of the CometChat UI library. The documentation says that the source code can be found in the downloaded SDK package under the Android/CometChat UI. I've unsuccessfully tried to find these files by the path from documentation, even in hidden folders. The question is h...
Div MoD
1

votes
1

answer
154

Views

Could not find method leftShift() for arguments after updating studio 3.4

After updating studio 3.4 and Gradle version to 5.1.1 I got the error on my task as Could not find method leftShift() My task: task incrementBetaVersion
Bhuvanesh BS
5

votes
3

answer
286

Views

Android data binding “Missing import expression although it is registered” after upgrade to gradle 5.0

After I upgrade my Android studio to 3.4, Android Gradle Plugin to 3.4 and gradle to 5.1.1 I got the data binding errors like below I have made sure I cleaned project and rebuild, I have cleared cache and restarted AS. This issue never happened before the upgrade I can confirm it is because of the n...
CodingTT
0

votes
0

answer
6

Views

Multiple signingConfigs + flavor + buildType

I have several flavors, buildtypes and siginiConfig and everything is ready, but it never catches the sigini flavor. It always takes siginiConfig from buildType. I already checked all the documentation I found and I just saw examples that the buildtype did not have sigini, there are no examples of b...
Hugo
0

votes
0

answer
25

Views

Where can i get android-common library to add it in gradle build?

I am converting android system application 'Contacts' based on Android.mk buid to gradle build ,from Android Studio. Getting error CompositeCursorAdapter symbol is not resolved . Which is part of package import com.android.common.widget.CompositeCursorAdapter; When i checked Android.mk ,Having dep...
Rajesh Gopu
1

votes
2

answer
206

Views

Android Build Error: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive

I'm facing this error when trying to build the app in release mode. Error: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive My proguard-rules.pro line looks like this: -keepattributes Signature what InnerClasses is the compiler referring to? What am I omitting?
Daniele
1

votes
1

answer
1.1k

Views

DexArchiveBuilderException: Failed to process /xxx/.gradle/caches/transforms-1/files-1.1/play-services-location-11.2.2.aar

When I try to compile my project I get this weird error: What went wrong: Execution failed for task ':android:transformClassesWithDexBuilderForProdDevelopmentDebug'. com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing....
PeteWonder
1

votes
2

answer
241

Views

Why gradle plugin 3.3.0 doesn't want to build google-services?

I'm trying to Sync my project with gradle:3.3.0 , but in result file values.xml for google-services is not generated in folder: D:\Android\workspace\myproject\app\build\generated\res\google-services\debug\values\values.xml Top level build file build.gradle: apply plugin: 'kotlin' buildscript { ext.k...
NickUnuchek
1

votes
0

answer
190

Views

Got error while migrating to Android Studio 3.1 Canary 5 Build?

I tried following steps: 1.changed to classpath 'com.android.tools.build:gradle:3.1.0-alpha05' maven { url 'https://maven.google.com/' name 'Google' } and added google() android.enableAapt2=false in gradle.properties 4. android { compileSdkVersion 27 buildToolsVersion '27.0.1' defaultConfig { appli...
Swapnil
1

votes
2

answer
187

Views

Gradle sync Failed and many error are appearing as could not resolve

I am not able to understand what is the issue? Can anyone Help, attaching the screenshot for Android Studio Build grade file is // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpa...
R. Ranjan
1

votes
1

answer
2k

Views

BuildException: Failed to execute aapt

I am trying to build the project and following error is coming: org.gradle.tooling.BuildException: Failed to execute aapt at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:547) at com.android.build.gradle.internal...
Malwinder Singh
1

votes
1

answer
35

Views

Updating play services without reducing minSdkVersion

I use the following play services library in my android project. play-services-location,play-services-auth and play-services-gcm. The library are in version 9.2.0.I have the minSdkVersion as 9. I recently added the VerifyApps API into the project and in order to use that library properly I had to ad...
Nirmal Raj
1

votes
2

answer
256

Views

Kapt exception when creating XML file

I am working in Kotlin on Android Studio. The project compile and works perfectly, but then when I try to create a new XML file, I keep getting a kapt exception 'Exception while annotation processing'. I try to create XML file by right click on res folder -> New -> Layout Resource File, and I also t...
Elynad
1

votes
1

answer
93

Views

Android App is not installable from Play Store in spite of targeting the right SDK. Why?

Here is my Gradle file without the dependencies; apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId 'com.xxx.yyy' minSdkVersion 15 targetSdkVersion 27 versionCode 2 versionName '1.1' multiDexEnabled true testInstrumentationRunner 'android.support.tes...
Zac
1

votes
0

answer
55

Views

Couldn't find the build.properties file

I've recently linked gradle to the android.mk file in order to migrate from ndkcompile.But I couldn't make the last step of the process which was to disable the ndkcompile by navigating to the buil.properties which I couldn't find anywhere in Android Studio. This is my gradle build file :apply plugi...
Zakaria Bennane
1

votes
1

answer
76

Views

Authentication with FireBase using email id and password: Unable to Merge Dex

I found something new while doing research on firebase authentication functionality for my project. After enabling email and password type and using the given below library of firebase it shows me the error of unable to merge dex. Whenever I use this library I get this error. compile 'com.firebaseui...
Dnveeraj
1

votes
0

answer
97

Views

Test execution using gradle connectedAndroidTest does not execute parallely on all connected devices

I am performing instrumented test execution using gradlew connectedAndroidTest on physical devices. But while doing this, I observe that irrespective of number of devices connected to my machine, at max 3-4 devices only have the tests running. For Example - If I have 10 android devices connected to...
Shredder
1

votes
1

answer
432

Views

Android Gradle 3 facebook-login:4.29.0 dex merge error Program type already present

Hey I am trying to add the newest version of facebook-login:4.29.0 to my app. In doing so I updated to Gradle 3. I cannot resolve this dex merge. It only happens if I include the facebook-login library. Maybe I did something with the gradle 3 migration wrong? I have a few other facebook libraries th...
StarWind0
1

votes
1

answer
1.6k

Views

Gradle sync failed: Could not connect to server

In my android studio 3.0 i am continuously getting this error - Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart Android Studio. after this my gradle sync also failed stating the error - Gra...
Gaurav Sahu
1

votes
0

answer
155

Views

CMake ExternalProject superbuild isn't executed with Android NDK

Related to: build cmake ExternalProject with gradle I'm trying to port an existing C++ project to Android (using Android Studio 3.0.1). The C++ project depends on a few other C++ packages. Since they all need to be cross-compiled for Android, I'm trying to execute a superbuild using CMake's External...
tac-eibmoz
1

votes
0

answer
343

Views

app:transformClassesWithDesugarForDebug error when I am using a particular jar's method otherwise working fine

Hi I am using appium with android studio When I use testng jar file then it throws following error import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class Test2 { @BeforeClass public void setUp() { System.out.println('seyup'); } @Test public void test1() { System...
Anubha
1

votes
0

answer
105

Views

Android Gradle custom task to run multiple assembles? Tasks are not dsistinct

I am trying to create a custom Gradle task for an Android project that will build both my flavours at the same time, rename the APK's and then copy them to a different folder. The issue is I have another version of this task that is almost identical to the first one and when I run one task a part of...
Donal Rafferty
1

votes
1

answer
284

Views

How can I inject build.config variables into my build.gradle

I added my one signal app id to environment variables in gradle.properties file. I want to call this variable in my gradle file from my build.gradle auto generated file. Is it possible?
Farouk Jabberi
1

votes
0

answer
523

Views

SonarQube integration with gradle

I am integrating Sonar qube with gradle. I have mentioned plugin and required properties in app level build.gradle file.But command execution failed with exception. Please clarify what else required? Build.gradle : plugins { id 'org.sonarqube' version '2.6.1' } sonarqube { properties { property 'son...
Anshika Bansal
1

votes
0

answer
49

Views

Including single aar modules of a library project through jitpack / Github

I`m maintaining an android project with just an android library module in it. This is accessed by other projects through an upload from Git to jitpack and then referencing it as dependency in gradle. implementation 'com.github.::1.0.0' Is it possible to have further android library modules, which a...
Lemao1981
1

votes
1

answer
2.2k

Views

How to get rid of “Call requires API level 26 (current min is 24)”?

How can I tell Android Studio (3.0.1) not to display API 26 functions in the IntelliSense? It's quite misleading. Why does it propose those functions if I cannot use them? Example: if I use the java.util.Date, it tells me: 'Date(int, int, int)' is deprecated as of API 16: Android 4.1 (Jelly Bean) A...
kevinob
1

votes
1

answer
2.4k

Views

Getting error of Gradle sync failed

I am getting error of Gradle sync failed: Could not find org.jetbrains.trove4j:trove4j:20160824. Searched in the following locations: file:/D:/android/gradle/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom file:/D:/android/gradle/m2repository/org/jetbrains/trove4j/trove4j/2...
user3118448
1

votes
0

answer
59

Views

Gradle not syncing after update

I was working on a project in android studio. Unfortunately, my harddisk started giving errors, so I backed up my project. Then, I bought a new harddisk and installed android studio(ver 3.0.1). I don't clearly remember the previous version of android studio that I used but I guess it was 2.6. Here c...
Rektirino
1

votes
0

answer
423

Views

Getting unresolved reference error in Kotlin Android Library Project

I am getting unresolved reference error in Kotlin Android Library project. 1.) standard_kotlin_lib.jar --> contains: Kotlin classes, META-INF/standard_kotlin_lib.kotlin_module 2.) A.aar --> compiles only standard_kotlin_lib.jar file. After compilation, inside generated A.aar file’s classes.jar: ME...
user3066038
1

votes
1

answer
231

Views

Where is the source code of the Gradle task “createDebugCoverageReport” in an Android Studio project

I've been searching in https://android.googlesource.com/platform/tools/build/ but didn't find it.
Sah
1

votes
1

answer
352

Views

Gradle build fails on enabling data binding

i am facing a strange issue. I have decided to enable databinding in my project and in order to do so i followed the developer.android guidelines. So i added the dataBinding tag in my gradle file and gradle sync fails and shows the following error. Error:java.lang.NullPointerException Error:Executio...
Mehrosh Mehboob
1

votes
0

answer
528

Views

How to build a jar/aar with dependencies in android studio?

I had a project library in android studio with following dependencies. apply plugin: 'com.android.library' android { compileSdkVersion 26 defaultConfig { minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName '1.0' testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' }...
1

votes
1

answer
260

Views

Configure react native workers for circle CI

I am trying to run a react native android build on circle ci these are the react versions in package.json 'react': '^16.2.0', 'react-native': '0.50.0', I am setting these environment variables: _JAVA_OPTIONS: '-Xmx2000m' JVM_OPTS: '-Xmx2000m -XX:ParallelGCThreads=1 -XX:ConcGCThreads=1 -Djava.util.c...
gdogaru
1

votes
1

answer
401

Views

Gradle build failed.Execution failed for task ':app:transformClassesWithDesugarForDebug'. for Android Studio 3.0.1

I added some new libraries and features(JAX-RS) and gradle build fails. I get this in the stacktrace Error:java.lang.ClassNotFoundException: Class org.osgi.framework.SynchronousBundleListener not found Error:java.lang.RuntimeException: com.android.build.api.transform.TransformException: java.lang...
Shankhadeep Ghoshal
1

votes
1

answer
356

Views

Failed to Process, Error while dexing, when trying to run on Android

The application that I am working on compiles just fine when I hit either Build > Clean Project, or Build > Build Project. It is when I select to Run it that I get the following error message: Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users//Documents/Work-Rela...
William King
1

votes
1

answer
56

Views

Bintray upload failing, unable to find class R

I have made an android library by following this. Everything worked perfectly fine and I was able to upload my library to jcenter, also my library internally uses one java jar as dependecy. Now I have made some improvements and wants to update my library but when I run the command gradlew clean bu...
Sunny
1

votes
0

answer
58

Views

How to override gradle settings using a local file?

I want to override some properties from my root gradle file. Those properties are in the ext block in the root gradle file for my project. I do not want to change those properties in the project files as it could generate problems when making a commit and push to the repository because i want some v...
acabezas

View additional questions