Questions tagged [gradle]

19387 questions
1

votes
1

answer
423

Views

how to prevent jacoco instrumenting production code?

i use jacoco plugin for gradle: apply plugin: 'kotlin' jacoco { toolVersion = '0.7.9' } jacocoTestReport { reports { xml.enabled true html.enabled false csv.enabled false } } and then i want to build a package for production ./gradlew build jacocoTestReport the question is: will the generated packag...
piotrek
1

votes
3

answer
4.7k

Views

Android dependency com.google.firebase:firebase-core different version for the compile (12.0.1) and runtime (11.4.2)

this is my Project Gradle dependencies classpath 'com.android.tools.build:gradle:3.1.0' classpath 'com.google.gms:google-services:3.0.0' classpath 'io.realm:realm-gradle-plugin:4.2.0' classpath 'com.google.firebase:firebase-plugins:1.1.1' this is my App Gradle dependencies implementation 'com.googl...
Andrews
1

votes
2

answer
2.4k

Views

Android Studio maven { url “https://jitpack.io” } can't download

Can't use anymore maven { url 'https://jitpack.io' }. I have following gradle: apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId 'test.com.myapplication' minSdkVersion 19 targetSdkVersion 27 versionCode 1 versionName '1.0' } buildTypes { release { m...
Choletski
1

votes
1

answer
1.1k

Views

Could not find method buildTypes() for arguments on project ':app' of type org.gradle.api.Project

After i import an Eclipse projet to Android studio 3.0.1 Now this is the build.gradle for my projet apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId 'com.zombieshunter.gameoverstudios' minSdkVersion 14 targetSdkVersion...
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
0

votes
0

answer
4

Views

Adding upper level gradle file to an android studio project

I am attemtping to import an android studio project, however the project seems to be missing an upper-level gradle file. The imported project has a structure as shown below: Any time i attempt to create the top level gradle file I'm unable to, and am given a message saying a file called build.gradle...
MantyQuestions
1

votes
1

answer
330

Views

Error upgrading to Kotlin 1.2.60, Android Studio 3.1.3

Pretext: I have 3 build variants for my project apart from release and debug I also have the staging variant. Gradle sync works completely fine with version 1.2.51, but as soon as I upgrade to version 1.2.60, which released recently, gradle sync fails with the following error message: Could not fi...
MadScientist
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
1

votes
1

answer
530

Views

The import org.springframework cannot be resolved - Java(268435846)

I'm trying to use the Spring Framework in my project, but I have a problem with the import. I'm working with Gradle for builds, React JS for the front end and Java for the back end. The weird thing is that I can use classes as RowMapper and JdbcTemplate (I can read and write in my database using t...
Sam Mahaux
1

votes
1

answer
494

Views

Gettting “Android App Not Installed. The package conflicts with an existing package by the same name” when installing new version

I am trying to install a new signed release version of one of my app via file-manager present on my phone but I am getting this error message 'APP not installed The package conflicts with an existing package by the same name'. I had already installed the previous version from google play Store both...
m3g4tr0n
1

votes
1

answer
110

Views

Create jar with fix name excluding version using gradle

I want to create a fat jar using gradle only with name, not include a version of the project. I am using gradle 5.1 and spring boot 2.1.1. I have tried the following solutions with no luck https://stackoverflow.com/a/53123771/8123983 https://stackoverflow.com/a/31407245/8123983 Default jar name proj...
S_K
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
4

answer
109

Views

Jenkins and gradle - build projects with latest versions of dependencies for CI, specific versions for production

I am working with Jenkins, Gradle and our Ivy repository. Our build scripts specify the exact version of dependencies to be used for the build. This is good practice for production. For CI it would be interesting if the project build used the latest versions of our own libraries, that way we could n...
Kevin Sadler
1

votes
1

answer
59

Views

Geb, Spock, Gradle and maxParallelForks

I am having some trouble understanding an issue we are having with our Geb/Spock tests. We are using gradle and we are trying to run our tests in parallel. As I understand it, the maxParallelForks property in gradle will run test classes in separate JVMs. The issue I am running into is when I ha...
jcattau
1

votes
1

answer
366

Views

ERROR: In project 'app' a resolved Google Play services library dependency depends on another

I getting error like this when I tried to upgrade my plug-ins.I tried lot bu Unable to fix this. Gradle: private static void googleAndFirebase(configuration) { //gcm configuration.implementation 'com.google.android.gms:play-services-gcm:16.0.0' //Firebase libs configuration.implementation 'com.googl...
Rajasekaran M
1

votes
1

answer
56

Views

Failed to resolve firebase-ui-auth

When I use implementation 'com.firebase.firebase-ui-auth:4.3.1' it pops up an error I even tried to change it to 3.3.1 then it shows a failure that it could no find the package I have change it to 16.0.1 too then too an error is my app compact version is v7-28.0.0 implementation 'com.google.firebas...
Ragnarok
1

votes
1

answer
50

Views

Is there any keyboard shortcut for Gradle Sync Now in Android Studio?

Anyone know if there is any short key for App Level Gradle Syncing in Android Studio?
Ssubrat Rrudra
1

votes
1

answer
26

Views

Gradle generate sources.jar for only public interfaces

I am working on a closed-source Android library (published as an AAR), and want to include some javadocs for consumers, which requires a sources.jar. I know I could cherry-pick each file using an includes property or maybe even a whole package/folder. task('androidSourcesJar', type: Jar) { classifie...
MikeB
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
2

answer
55

Views

Cannot resolve method 'buildAsync()'

I used to develop bot on JavaScript, but because I code a lot on C++, I decided to move to Java. I found a tutorial and they told me to use Gradle. I followed the instructions and now have this code: import net.dv8tion.jda.api.JDABuilder; import javax.security.auth.login.LoginException; public class...
The Developer
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
0

votes
0

answer
9

Views

Why do I get UnknownPluginException when trying to use a custom Kotlin complier plugin in Gradle?

I have created a custom Kotlin compiler plugin for Gradle. It was inspired by kotlin-allopen (2) and sample-kotlin-compilier-plugin, and is supposed to make all Kotlin classes non-final. The problem is, I'm unable to use it in my projects, I only get the following: Caused by: org.gradle.api.plugins...
neu242
0

votes
0

answer
16

Views

Multiple Docker containers using the same image with Spring Boot Profiles & Gradle

I'm trying to run multiple instances of an API from the same image and same Gradle script. As you can see below in my docker-compose file, I have api-participant, and would like to create api-participant2, 3, 4 etc, because they each need their independent, custom applications, DB, frontend, etc. Th...
Dar K
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
1

answer
37

Views

Autowired dependency is null

I have a spring-boot project that I have been able to run successfully on my older mac running Sierra. I recently bought a new mac with Mojave on it, and when I build the spring-boot project I get a NullpointerException when trying to use an @Autowired dependency. I've made sure that I'm building t...
migueljuan
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
0

votes
0

answer
11

Views

IntelliJ - Gradle - Kotlin - Micronaut - Changing files does not re-generate classes on “run”

I have a Kotlin-Micronaut v.1.0.2 project in IntelliJ and with Gradle v5.3. My running application has for example the following controller: @Controller('/api/test') class TestController { @Get fun helloWorld() = 'Hello World' } In case I change any of this code, for example change the return value...
Florian Hansen
0

votes
0

answer
3

Views

Why can I not assign a value to a gradle property in an extension?

I am creating a custom gradle plugin in gradle 5.4. I have an extension: public class ExternalResourcesPluginExtension { public final Property update; public ExternalResourcesPluginExtension(final Project project) { this.project = project; update = project.getObjects().property(Boolean.class).conven...
Steiny
1

votes
2

answer
541

Views

Android xml, how to get gradle parameter value

I'm developing an Android app and I have to show the app's version, which is stored at the build.gradle file, at an xml layout, I want to set the value from the xml. How can I do that? This is the content in my gradle file android{ defaultConfig { minSdkVersion 9 targetSdkVersion 19 versionCode 2 ve...
Mikel
1

votes
2

answer
4.4k

Views

Cannot add Spring dependencies with Gradle

I am new to Spring, and I am trying to create a simple Spring Boot 'hello world' application, so I created a build.gradle file to add Spring Boot dependency: apply plugin: 'java' repositories { jcenter() } dependencies { compile('org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE') } The...
user2340612
1

votes
2

answer
302

Views

Eclipse: How can I have gradle dependencies deployed to Tomcat

I'm creating a web project using Gradle (buildship) in Eclipse (WTP). I've put the libraries I need as 'implementation' dependencies in my build.gradle, however they are not copied to Tomcat when I try to run the project from within Eclipse. When I build the WAR file (with gradle war), however, all...
niqueco
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
1

answer
1.1k

Views

gradle build fails from terminal for lombok annotation in spring boot application

I am trying to generate war of spring boot application and using lombok for getter setter. Running gradle build command from terminal and getting error in all getter setter and constructors ie. can not find symbol. I am using STS and able run project successfully from sts. but from command line it t...
Anjali
1

votes
2

answer
98

Views

Getting Build Error after upgrading to Android Studio 3.2.1

My Build is failing with this error - Manifest merger failed with multiple errors, see logs Merging Errors it shows as - Error: Missing 'name' key attribute on element meta-data at AndroidManifest.xml:23:9-51 app main manifest (this file), line 22 Error: tools:replace specified at line:23 for att...
Nikhil
1

votes
1

answer
927

Views

JVM space exhausted when building a project through gradle

Receiving error message when building a project through gradle Expiring Daemon because JVM Tenured space is exhausted
Rob Blinsinger
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
1

answer
78

Views

Publish artifact to local maven repo with SBT and use it in Gradle project

Here is what I want to do: In my Scala sbt project, I want to publish an artifact to my local maven repository Afterwards, I want to use this artifact in a Gradle-based Java project Here is where I struggle: I have published the artifact somewhat successful using sbt publishM2. Here is my build.sbt:...
Florian Baierl
1

votes
1

answer
193

Views

How to make a dialer based on Google's Android latest dialer app (or of a Vanilla based ROM such as Lineage OS)?

Background Starting from Android M, it's possible to make a replacement to the dialer app of the OS, meaning that taking phone calls could show your own customized UI. This is done by extending InCallService class, and having an Activity that handles dialing intents: And to request to be the default...
android developer

View additional questions