Questions tagged [build.gradle]

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
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
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
2

votes
0

answer
22

Views

How to fix this error AAPT2 error: check logs for details?

I have a problem with my android studio. When I want to create a project or I want to open my previous project get this error AAPT2 error: check logs for details and when I check logs take this error error: attribute 'com.example.mahdi.servicemanager:headerLayout' not found. My project was already...
abbas jafary
1

votes
0

answer
1.3k

Views

Error:No installed build tools found. Install the Android build tools version 19.1.0 or higher

I am working on android project and every thing works fine, but when I started a new cordova project then it throw error Error:No installed build tools found. Install the Android build tools version 19.1.0 or higher. I search on google and in most of answer says change in ANDROID_PATH. My current AN...
Vivek
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
0

answer
27

Views

Delete only those folders and files that are not used by another resources from windows 'Temp 'folder using Gradle task

I am writing a gradle script to delete files and folder which are not used by other resources inside the 'Temp' folder in Windows i.e %TEMP%'. However, if some files are used by another resources, then it will not delete and throw exception when I try to delete. I tried: task cleanTempFile(type: Del...
Yogesh Ghimire
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
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
0

answer
266

Views

APK build failed with gradlew.bat assembleDebug command throught Jenkins

As a newbie with JENKINS, I'm starting with building a debug version apk of a simple HelloWorld android project. Running the 'gradlew.bat assembleDebug' on the local project folder works fine and I'm getting the .apk.But when it comes to Jenkins the build fails. JENKINS configuration is of the follo...
kingabdr
1

votes
0

answer
239

Views

How to start embedded ActiveMQ broker through gradle

I am writing integration test and i want to connect activeMQ broker. So far the strategy I am using ActiveMQ broker in gradle as dependency compile 'org.apache.activemq:activemq-broker:5.14.5' And In my configuration.xml file I am using vm://localhost?broker.persistent=false ${active.mq.username} ${...
ronypatil
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
0

answer
481

Views

Spring Test succeed on eclipse but fail on gradle build

I don't know why but my spring boot test succeed in eclipse when running it as junit, but then fail when I execute the command: gradle clean build Here is my build.gradle: buildscript { ext { springBootVersion = '1.5.8.RELEASE' } repositories { mavenCentral() } dependencies { classpath('org.springfr...
Lucy101
1

votes
1

answer
220

Views

Get the running gradle task name

I use gradle splits to generate different apks for different architectures. However, based on the running 'assemble(ABI)' I'd like to disable building some native libraries. My question is, if I run: gradle assembleMipsDebug how can I get 'assembleMipsDebug' or preferably 'mips' from build.gradle s...
Poka Yoke
1

votes
0

answer
350

Views

Build gradle multi module project in parallel

I have a project setup like this: :root :common :module1 :module2 :module3 :module4 :app The dependencies between the modules are like this: :common --> 'none' :module* --> :common :app --> 'all other modules' The root build gradle defines just a buildscript for certain plugins (like the kotlin grad...
chris115379
1

votes
2

answer
660

Views

ProGuard Configuration Parse Error, after enabling “minifyEnabled”

My Android project is working completely fine, but when I enabled this option minifyEnabled true I got following error: com.android.build.gradle.shrinker.parser.ProguardParserException: ProGuard configuration parser error: /Users/mss/.gradle/caches/transforms-1/files-1.1/play-services-base-11.8.0.aa...
MSS
1

votes
0

answer
75

Views

How to get gradle exec task to print std out in real-time

I am executing a gradle exec task to build npm: task build(type: Exec) { commandLine 'npm','run', 'build' } However, it only prints all of the standard output from npm run build when the task is completed. Whereas if you run it manually, it prints stuff to std out as it is running. How do I get the...
james
1

votes
1

answer
381

Views

Android Studio : Error converting bytecode to dex

When I started to build the app I get this error Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid/arch/lifecycle/LiveData$1; This is the dependencies I have in my build.gradle dependencies { implementation 'com.android.support.constraint:cons...
Manokar
1

votes
0

answer
34

Views

How to figure out missing includes for gradle 'implementation'?

I use an internal library (lib) in my Android app (app). On my local machine both api 'com.example.lib:1.2.3' and implement 'com.example.lib:1.2.3' is working and building. but on TeamCity api works but implementation can not find: Caused by: org.gradle.api.resources.ResourceException: Could not g...
Ralf Wickum
1

votes
0

answer
226

Views

Error:Execution failed for task ':transformClassesWithMultidexlistForDebug'

After doing some refactors on my build.gradle, i can't stop having this error. My application Class extends Multidex and is installed on attachBaseContext. Clean + Rebuild don't work :( I googled a lot, and i can't find anything. Can anyone help me? Error: java.io.IOException: Can't write [/build/in...
Lucas Franco
1

votes
3

answer
1.1k

Views

Could not resolve com.android.support:design:26.1.0

I have been having this problem for quite a while, that my com.android.support:design:26.1.0 fails me and I have no clue what to change anymore. These are my files for module gradle. Build.gradle (app) apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '26.0.2'...
Jayden Choi
1

votes
0

answer
20

Views

CommandInvokeationFailure: Gradle build failed

All of a sudden I am unable to generate APKs. I have been running into a series of different errors. It looks like something is wrong with my multi-dex. Any help with this is appreciate, thanks! I tried to update my android support libraries and then I ran into another error
portfoliobuilder
1

votes
0

answer
85

Views

How to enhance existing configuration with custom gradle plugin

I'm new to implementing custom gradle plugins. What I want is to enhance the properties of another plugin If I find that it has been applied with some extra values from my custom gradle plugin. For example lets assume that on Project A I apply my custom plugin named customPlugin. I want my customPlu...
tbo
1

votes
3

answer
568

Views

How to apply and configure gradle plugin in external build file

I tried to split the build.gradle file into several smaller ones to reduce the size and to encapsulate different functionalities. I ended up with: // build.gradle plugins { id 'org.jetbrains.kotlin.jvm' version '1.2.30' } apply from: 'klint.gradle' and // klint.gradle buildscript { repositories { ma...
guenhter
1

votes
1

answer
41

Views

How Android Product Flavors and Configuration help to maintain and support single code base to distribute multiple client

I have a requirement Android Product Flavors and Configuration help to maintain and support single code base to distribute multiple clients. I referred few links, It gives a basic idea. My question is actually Am I'm going correct direction. I very new to this kind scenario. eg: Product name: Mohan...
MohanRaj S
1

votes
0

answer
471

Views

specify classifier and type in gradle

I need to add a dependency (test-jar, from log4j), but I don't know what is the correct syntax in gradle to include it in the compile('..') config step. I need to specify the classifier and the type, but in the compile step I can only specify :group :name :version. What is the correct syntax? (I a...
alebaffa
1

votes
1

answer
339

Views

Include jar files in gradle project [duplicate]

This question already has an answer here: How to add local .jar file dependency to build.gradle file? 15 answers I am trying to include a local jar file in my 'Java' gradle project. I have added jar files in my 'main/resource' folder of project. and in build.gradle added following lines :- compile...
Prashant Bhagat
1

votes
2

answer
465

Views

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. Fix this issue

Help me in solving this issue as i am beginner in android ,i need some help.. Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. java.io.IOException: Can't write [D:\bi.mobile\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\sort.Vijay...
s.vijay
1

votes
0

answer
219

Views

Error:Execution failed for task ':app:processDebugResources'. Android Studio Error

Today, I opened Android Studio, then I get this error. Yesterday, there was a no problem such that! Error:Execution failed for task ':app:processDebugResources'. Error: more than one library with package name 'com.google.android.gms.license' com.google.android.gms:play-services-xxx libraries was 11...
Gürkan Çatak
1

votes
4

answer
878

Views

Build failing after Updating Android Studio to 3.1

After updating my android studio to 3.1 and gradle to 4.4 app is not building and shows error every time. It syncs properly every time but when I try to run it it shows build error. minimum sdk : 21 Error log: org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwar...
abhishek
1

votes
2

answer
367

Views

Can't build app, error TaskExecutionException :app:compileDebugJavaWithJavac, gradle 3.1.0

I have updated Android Studio from 3.0 to ver. 3.1 buildToolsVersion 26.0.2 to buildToolsVersion 27.0.3 classpath 'com.android.tools.build:gradle:3.0.1' to 3.1.0 And now my project doesn't build build failed : org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAw...
NickUnuchek
1

votes
0

answer
44

Views

How implementation configuration in gradle is being enforced?

I'm trying to dive deep into how gradle works and trying to understand its awesomeness. So i created two projects: 1) Project B which contains guava dependency as implementation, next i deployed this project using publishToMavenLocal task. 2) Project A which contains dependency to project B as imple...
Hadson
1

votes
1

answer
46

Views

Android Sync issue with SDK versions

I am developing an Android application and I am using 'Firebase-Messaging' library in my application. Now I need to 'proguard' and unfortunatly, 'Firebase' generated errors. I searched for solution and then I change the 'buildToolVersion' version 25.0.0 into 26.0.2. When I changed the versions I got...
Nuwan Withanage
1

votes
1

answer
871

Views

Gradle sync failed: Cause: startup failed:

I am new in android programming and I use android studio IDE 3.1 I'm trying to import ECLIPSE ANDROID PROJECT into android studio and realease an apk . It has been two weeks trying that but i get this errors : org.gradle.cache.CacheOpenException: Could not open cp_proj remapped class cache for eehls...
Donald P. Benford
1

votes
0

answer
255

Views

gradle sonar-scanner and sonar-scanner results are not same

I want to analyze a multi language project with a sonarqube Sonarqube version 6.7 Sonar-scanner version 2.6.1 but When running as build.gradle, java is only checked. When running with sonar-scanner, the all language(java,js,php etc.) is checked but coverage does not appear on the result screen. this...
Ksshin
1

votes
2

answer
674

Views

How to get all android app flavor name programatically

I want to get all app flavor list in activity, how can i get this? This is how i implemented flavor in my app via Gradle. I can get only current flavor by BuildConfig.java class. public static final String FLAVOR = 'myExamIdea'; But i want to get all flavor list. Below is my gradle file snippet. fl...
Khemraj
1

votes
0

answer
47

Views

Activity Closing After Multiple Clicks

Every time I run my app and I keep going to the next activity after clicking 15-16 times the next activity its says it is going to unfortunately close. I/art: Alloc sticky concurrent mark sweep GC freed 907(64KB) AllocSpace objects, 1(16KB) LOS objects, 0% free, 95MB/96MB, paused 701us total 8.300ms...
1

votes
0

answer
271

Views

Android - create uber/fat aar, error on implementation

I want to create a single uber/fat aar. I have a library (libA) which is dependant on another library (libB) and I would like to bundle them together, preferably using gradle. This uber/fat aar will then be used in an app. Initially I looked at 2 similar gradle plugins, shadowJar and fataar but due...
Keith Darragh
1

votes
0

answer
149

Views

unexpected token in build.gradle when running react-native run-android

I am trying to run the AwesomeProject in an android emulator using react-native out of the box which is pretty straightforward. I followed all the steps for installing the android studio and emulator. When trying to build the project using react-native run-android, I however get the following error:...
pj013

View additional questions