Android DataBinding increases Compilation time - android
After using DataBinding in my project, it increases the compilation time by almost 3 time.
Anyone experienced this issue and any one have solution to this issue
android {
....
dataBinding {
enabled = true
}
}
here is the Gradle Process,
Gradle console output should be something like this (produced also without Data Binding dependency), where most tasks show "UP-TO-DATE":
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.:app:preBuild UP-TO-DATE
Launcher 30m34.33s (total)
:Launcher:crashlyticsUploadRelease 3m48.28s
:Launcher:crashlyticsUploadRelease 3m47.65s
:Launcher:crashlyticsUploadRelease 3m47.36s
:Launcher:transformClassesAndResourcesWithProguardForRelease 2m10.91s
:Launcher:transformClassesAndResourcesWithProguardForRelease 1m15.67s
:Launcher:mergeHDebugResources 1m14.40s
:Launcher:transformClassesWithDexForDebug 1m11.57s
:Launcher:transformClassesWithMultidexlistForDebug 50.019s
:Launcher:transformClassesAndResourcesWithProguardForRelease 45.933s
:Launcher:transformClassesWithDexForDebug 44.197s
:Launcher:mergeReleaseResources 42.840s
:Launcher:transformClassesWithDexForRelease 39.647s
:Launcher:transformClassesWithDexForDebug 37.544s
:Launcher:transformClassesWithMultidexlistForDebug 35.999s
:Launcher:compileReleaseJavaWithJavac 30.436s
:Launcher:compileDebugJavaWithJavac 30.246s
:Launcher:mergeDebugResources 27.041s
:Launcher:compileReleaseJavaWithJavac 26.340s
:Launcher:mergeReleaseResources 26.216s
:Launcher:transformClassesWithDexForRelease 21.634s
:Launcher:compileReleaseJavaWithJavac 20.928s
:Launcher:transformClassesWithDexForRelease 20.263s
:Launcher:transformClassesWithMultidexlistForDebug 17.442s
:Launcher:compileDebugJavaWithJavac 16.619s
:Launcher:mergeReleaseResources 13.947s
:Launcher:dataBindingProcessLayoutsDebug 55.383s
:Launcher:clean 13.641s
Related
Updating project from gradle 6.x to 7.x error
I want to upgrade my project gradle version from 6.1.1 to 7.0.0 and above, but when I upgrade anything above 6.9 I get errors and cannot find the problem. Them message it gives me is this: > Configure project :core publishNonDefault is deprecated and has no effect anymore. All variants are now published. > Configure project {name} Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin. WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'. It will be removed in version 5.0 of the Android Gradle plugin. > Task :core:preBuild UP-TO-DATE > Task :core:preDebugBuild UP-TO-DATE > Task :core:compileDebugAidl NO-SOURCE > Task :core:compileDebugRenderscript NO-SOURCE > Task :core:generateDebugBuildConfig UP-TO-DATE > Task :core:generateDebugResValues UP-TO-DATE > Task :core:generateDebugResources UP-TO-DATE > Task :core:packageDebugResources UP-TO-DATE > Task :core:parseDebugLocalResources UP-TO-DATE > Task :core:processDebugManifest UP-TO-DATE > Task :core:generateDebugRFile UP-TO-DATE > Task :core:kaptGenerateStubsDebugKotlin UP-TO-DATE > Task :core:kaptDebugKotlin UP-TO-DATE > Task :core:compileDebugKotlin UP-TO-DATE > Task :core:javaPreCompileDebug UP-TO-DATE FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':core:compileDebugJavaWithJavac'. > Failed to query the value of task ':core:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'. > Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, {direcory} org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#cea20b4) before task ':core:compileDebugJavaWithJavac' has completed is not supported * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':core:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.properties.DefaultTaskProperties.resolve(DefaultTaskProperties.java:74) at org.gradle.execution.plan.LocalTaskNode.resolveMutations(LocalTaskNode.java:202) at org.gradle.execution.plan.DefaultExecutionPlan.getResolvedMutationInfo(DefaultExecutionPlan.java:654) at org.gradle.execution.plan.DefaultExecutionPlan.selectNext(DefaultExecutionPlan.java:577) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$executeNextNode$1(DefaultPlanExecutor.java:166) at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:155) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to query the value of task ':core:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'. at org.gradle.api.internal.provider.AbstractProperty.doCalculateValue(AbstractProperty.java:136) at org.gradle.api.internal.provider.AbstractProperty.calculateOwnValueNoProducer(AbstractProperty.java:121) at org.gradle.api.internal.file.DefaultFilePropertyFactory$AbstractFileVar.access$100(DefaultFilePropertyFactory.java:180) at org.gradle.api.internal.file.DefaultFilePropertyFactory$AbstractFileVar$2.calculateOwnValue(DefaultFilePropertyFactory.java:263) at org.gradle.api.internal.provider.AbstractMinimalProvider.getOrNull(AbstractMinimalProvider.java:93) at org.gradle.api.internal.tasks.properties.FileParameterUtils.resolveOutputFilePropertySpecs(FileParameterUtils.java:115) at org.gradle.api.internal.tasks.properties.GetOutputFilesVisitor.visitOutputFileProperty(GetOutputFilesVisitor.java:44) at org.gradle.api.internal.tasks.properties.CompositePropertyVisitor.visitOutputFileProperty(CompositePropertyVisitor.java:64) at org.gradle.api.internal.tasks.properties.annotations.AbstractOutputPropertyAnnotationHandler.visitPropertyValue(AbstractOutputPropertyAnnotationHandler.java:50) at org.gradle.api.internal.tasks.properties.bean.AbstractNestedRuntimeBeanNode.visitProperties(AbstractNestedRuntimeBeanNode.java:56) at org.gradle.api.internal.tasks.properties.bean.NestedRuntimeBeanNode.visitNode(NestedRuntimeBeanNode.java:41) at org.gradle.api.internal.tasks.properties.DefaultPropertyWalker.visitProperties(DefaultPropertyWalker.java:41) at org.gradle.api.internal.tasks.TaskPropertyUtils.visitProperties(TaskPropertyUtils.java:44) at org.gradle.api.internal.tasks.properties.DefaultTaskProperties.resolve(DefaultTaskProperties.java:65) at org.gradle.execution.plan.LocalTaskNode.resolveMutations(LocalTaskNode.java:202) at org.gradle.execution.plan.DefaultExecutionPlan.getResolvedMutationInfo(DefaultExecutionPlan.java:654) at org.gradle.execution.plan.DefaultExecutionPlan.selectNext(DefaultExecutionPlan.java:577) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$executeNextNode$1(DefaultPlanExecutor.java:166) at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:155) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: org.gradle.api.InvalidUserCodeException: Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory,{directory} org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#cea20b4) before task ':core:compileDebugJavaWithJavac' has completed is not supported at org.gradle.api.internal.provider.TransformBackedProvider.lambda$beforeRead$0(TransformBackedProvider.java:84) at org.gradle.api.internal.provider.ValueSupplier$TaskProducer.visitContentProducerTasks(ValueSupplier.java:136) at org.gradle.api.internal.provider.TransformBackedProvider.beforeRead(TransformBackedProvider.java:81) at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:63) at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103) at org.gradle.api.internal.provider.MappingProvider.calculateOwnValue(MappingProvider.java:55) at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103) at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:128) at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:25) at org.gradle.api.internal.provider.AbstractProperty.doCalculateValue(AbstractProperty.java:133) ... 23 more * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 3s 10 actionable tasks: 10 up-to-date It has multiple libraries, and target and compile SDK is 30. I have tried to update some of the libraries like Hilt, but this does not fixed the issue. It has a lot of deprecated methods, but as I know this usually is not big problem.
Jenkins-pipeline fail : No such DSL method 'androidLint' found among steps
I get a failure for the stage 'Static analysis' during my jenkins-pipeline. Here is my Jenkinsfile : pipeline { agent any stages { stage('Compile') { steps { // Compile the app and its dependencies sh './gradlew compileDebugSources' } } stage('Unit test') { steps { // Compile and run the unit tests for the app and its dependencies sh './gradlew testDebugUnitTest testDebugUnitTest' // Analyse the test results and update the build result as appropriate junit '**/TEST-*.xml' } } stage('Build APK') { steps { // Finish building and packaging the APK sh './gradlew assembleDebug' // Archive the APKs so that they can be downloaded from Jenkins archiveArtifacts '**/*.apk' } } stage('Static analysis') { steps { // Run Lint and analyse the results sh './gradlew lintDebug' androidLint pattern: '**/lint-results-*.xml' } } stage('Deploy') { steps { // Build the app in release mode, and sign the APK using the environment variables sh './gradlew assembleRelease' // Archive the APKs so that they can be downloaded from Jenkins archiveArtifacts '**/*.apk' } } } } Here is the Console Output : [Pipeline] stage [Pipeline] { (Static analysis) [Pipeline] sh + ./gradlew lintDebug > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:checkDebugAarMetadata UP-TO-DATE > Task :app:generateDebugResValues UP-TO-DATE > Task :app:generateDebugResources UP-TO-DATE > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE > Task :app:extractDeepLinksDebug UP-TO-DATE > Task :app:javaPreCompileDebug UP-TO-DATE > Task :app:mergeDebugResources UP-TO-DATE > Task :app:processDebugMainManifest UP-TO-DATE > Task :app:processDebugManifest UP-TO-DATE > Task :app:processDebugManifestForPackage UP-TO-DATE > Task :app:processDebugResources UP-TO-DATE > Task :app:compileDebugKotlin UP-TO-DATE > Task :app:compileDebugJavaWithJavac UP-TO-DATE > Task :app:lintDebug Wrote HTML report to file:///var/jenkins_home/workspace/Pushr_master/app/build/reports/lint-results-debug.html Wrote XML report to file:///var/jenkins_home/workspace/Pushr_master/app/build/reports/lint-results-debug.xml BUILD SUCCESSFUL in 23s 14 actionable tasks: 1 executed, 13 up-to-date [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy) Stage "Deploy" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline GitHub has been notified of this commit’s build result java.lang.NoSuchMethodError: No such DSL method 'androidLint' found among steps [archive, bat, build, catchError, checkout, compareVersions, deleteDir, dir, dockerFingerprintFrom, dockerFingerprintRun, echo, emailext, emailextrecipients, envVarsForTool, error, fileExists, findBuildScans, findFiles, getContext, git, input, isUnix, jiraComment, jiraIssueSelector, jiraSearch, junit, library, libraryResource, load, lock, mail, milestone, node, nodesByLabel, parallel, powershell, properties, publishChecks, publishHTML, publishIssues, pwd, pwsh, readCSV, readFile, readJSON, readManifest, readMavenPom, readProperties, readTrusted, readYaml, recordIssues, resolveScm, retry, scanForIssues, script, sh, sha1, sleep, stage, stash, step, tee, timeout, timestamps, tm, tool, touch, unarchive, unstable, unstash, unzip, validateDeclarativePipeline, waitUntil, warnError, withContext, withCredentials, withDockerContainer, withDockerRegistry, withDockerServer, withEnv, withGradle, wrap, writeCSV, writeFile, writeJSON, writeMavenPom, writeYaml, ws, zip] or symbols [PVSStudio, acuCobol, ajc, all, allBranchesSame, allOf, always, androidLintParser, ansibleLint, ant, antFromApache, antOutcome, antTarget, any, anyOf, apiToken, architecture, archiveArtifacts, armCc, artifactManager, authorizationMatrix, axivion, axivionSuite, batchFile, bitbucket, bitbucketBranchDiscovery, bitbucketForkDiscovery, bitbucketPublicRepoPullRequestFilter, bitbucketPullRequestDiscovery, bitbucketSshCheckout, bitbucketTagDiscovery, bitbucketTrustEveryone, bitbucketTrustNobody, bitbucketTrustProject, bitbucketTrustTeam, bitbucketWebhookConfiguration, bitbucketWebhookRegistration, booleanParam, branch, brokenBuildSuspects, brokenTestsSuspects, buckminster, buildButton, buildDiscarder, buildDiscarders, buildRetention, buildUser, buildingTag, cadence, cargo, caseInsensitive, caseSensitive, ccm, certificate, changeRequest, changelog, changeset, checkStyle, checkoutToSubdirectory, choice, choiceParam, clair, clang, clangAnalyzer, clangTidy, cleanWs, clock, cmake, codeAnalysis, codeNarc, command, coolflux, cpd, cppCheck, cppLint, credentials, cron, crumb, cssLint, culprits, defaultFolderConfiguration, defaultView, demand, detekt, developers, diabC, disableConcurrentBuilds, disableResume, docFx, docker, dockerCert, dockerLint, dockerServer, dockerTool, dockerfile, downstream, doxygen, drMemory, dscanner, dumb, dupFinder, durabilityHint, eclipse, email-ext, envVars, envVarsFilter, environment, equals, erlc, errorProne, esLint, excludeCategory, excludeFile, excludeMessage, excludeModule, excludeNamespace, excludePackage, excludeType, expression, file, fileParam, filePath, findBugs, fingerprint, fingerprints, flake8, flawfinder, flexSdk, frameOptions, freeStyle, freeStyleJob, fromDocker, fromScm, fromSource, fxcop, gcc, gcc3, gcc4, gendarme, ghsMulti, git, gitBranchDiscovery, gitHubBranchDiscovery, gitHubBranchHeadAuthority, gitHubExcludeArchivedRepositories, gitHubExcludePublicRepositories, gitHubForkDiscovery, gitHubPullRequestDiscovery, gitHubSshCheckout, gitHubTagDiscovery, gitHubTopicsFilter, gitHubTrustContributors, gitHubTrustEveryone, gitHubTrustNobody, gitHubTrustPermissions, gitTagDiscovery, github, githubPush, gnat, gnuFortran, goLint, goVet, gradle, groovyScript, hadoLint, headRegexFilter, headWildcardFilter, hyperlink, hyperlinkToModels, iar, iarCstat, ibLinter, ideaInspection, includeCategory, includeFile, includeMessage, includeModule, includeNamespace, includePackage, includeType, infer, inheriting, inheritingGlobal, installSource, intel, invalids, isRestartedRun, issues, java, javaDoc, javadoc, jcReport, jdk, jdkInstaller, jgit, jgitapache, jnlp, jobBuildDiscarder, jobName, jsHint, jsLint, junitParser, junitTestResultStorage, klocWork, kotlin, ktLint, label, lastDuration, lastFailure, lastGrantedAuthorities, lastStable, lastSuccess, legacy, legacySCM, list, local, location, logRotator, loggedInUsersCanDoAnything, mailer, masterBuild, maven, maven3Mojos, mavenConsole, mavenErrors, mavenMojos, mavenWarnings, metrowerksCodeWarrior, mineRepository, modelsim, modernSCM, msBuild, myPy, myView, nagFortran, namedBranchesDifferent, newContainerPerStage, node, nodeProperties, nonInheriting, none, not, overrideIndexTriggers, paneStatus, parallelsAlwaysFailFast, parameters, password, pattern, pcLint, pep8, perforce, perlCritic, permanent, php, phpCodeSniffer, phpStan, pipeline-model, pipeline-model-docker, pipelineTriggers, pit, plainText, plugin, pmdParser, pollSCM, prefast, preserveStashes, projectNamingStrategy, protoLint, proxy, pruneTags, puppetLint, pyDocStyle, pyLint, qacSourceCodeAnalyser, queueItemAuthenticator, quietPeriod, rateLimit, rateLimitBuilds, recipients, recordIssues, requestor, resharperInspectCode, resourceRoot, retainOnlyVariables, rfLint, robocopy, ruboCop, run, runParam, sSHLauncher, scala, schedule, scmRetryCount, scriptApproval, scriptApprovalLink, search, security, shell, simian, simpleBuildDiscarder, skipDefaultCheckout, skipStagesAfterUnstable, slave, sonarQube, sourceRegexFilter, sourceWildcardFilter, sphinxBuild, spotBugs, ssh, sshPublicKey, sshUserPrivateKey, standard, status, string, stringParam, styleCop, sunC, suppressAutomaticTriggering, swapSpace, swiftLint, tag, tagList, taskScanner, taskingVx, teamSlugFilter, text, textParam, tiCss, timestamper, timestamperConfig, timezone, tmpSpace, tnsdl, toolLocation, triggeredBy, tsLint, unsecured, untrusted, upstream, upstreamDevelopers, userSeed, usernameColonPassword, usernamePassword, viewsTabBar, warningsParsers, warningsPlugin, weather, withAnt, x509ClientCert, xlc, xmlLint, yamlLint, yuiCompressor, zfs, zip, zptLint] or globals [currentBuild, docker, env, params, pipeline, scm] at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:216) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor475.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.run(WorkflowScript:32) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(ModelInterpreter.groovy:137) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:661) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:395) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:393) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:660) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:288) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:544) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:543) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:276) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:443) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:442) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:275) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:481) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:480) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:274) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:586) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:585) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:272) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:356) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:355) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:261) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:613) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:612) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:259) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:443) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:442) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:254) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83) at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE I am not sure why I get "No such DSL method 'androidLint' found among steps". I thought it's a jenkins-plugin problem, since Android Lint Plugin seems deprecated, I can't access to the link : https://plugins.jenkins.io/android-lint/ I installed the plugin : Warnings Next Generation => https://plugins.jenkins.io/warnings-ng/ that seems to contain Android Lint Plugin, and yet, I still get the error : No such DSL method 'androidLint'... Does someone have any idea why the stage('Static analysis') fail ? Is it a missing plugin ? Thank you.
After investigation, it seems "androidLint" is not supported by "Warnings Next Generation Plugin", and has been replaced by "androidLintParser" the correct step with Warning Next Generation plugin is : stage('Static analysis') { steps { // Run Lint and analyse the results sh './gradlew lintDebug' androidLintParser pattern: '**/lint-results-*.xml' } }
Cannot resolve reference to DrawImage() from Jetpack Compose in Kotlin - Android 4.0 Canary Studio [duplicate]
I'm trying call DrawImage() on my code, I'm following this tutorial Jetpack Tutorial, But I'm getting this error.: Unresolved reference: DrawImage I tried implement on build.gradle, this lib.: implementation 'androidx.ui:ui-foundation:0.1.0-dev04' But I getting this error.: Executing tasks: [clean, :app:assembleDebug] in project C:\Users\samue\Desktop\Projetos Kotlin\first-jetpack Task :clean Task :app:clean Task :app:preBuild UP-TO-DATE Task :app:preDebugBuild UP-TO-DATE Task :app:compileDebugAidl NO-SOURCE Task :app:generateDebugBuildConfig Task :app:compileDebugRenderscript NO-SOURCE Task :app:prepareDebugKotlinCompileTask Task :app:generateDebugResValues Task :app:generateDebugResources Task :app:createDebugCompatibleScreenManifests Task :app:extractDeepLinksDebug Task :app:processDebugManifest Task :app:mergeDebugResources Task :app:processDebugResources Task :app:compileDebugKotlin FAILED w: ATTENTION! This build uses unsafe internal compiler arguments: -XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes This mode is not recommended for production use, as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation Element is unknownThe root cause java.util.NoSuchElementException was thrown at: androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362) at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:35) at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93) at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm$default(JvmBackendFacade.kt:64) at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:52) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:36) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:638) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:198) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:349) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:237) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:37) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:79) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:91) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:606) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:99) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1645) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate. at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362) at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitBlock(ComposableCallTransformer.kt:252) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:128) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl.accept(IrBlockImpl.kt:52) at org.jetbrains.kotlin.ir.expressions.IrExpression$DefaultImpls.transform(IrExpression.kt:28) at org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase.transform(IrExpressionBase.kt:24) at org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.transformChildren(IrVariableImpl.kt:93) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:87) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:88) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.accept(IrVariableImpl.kt:86) at org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42) at org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27) at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transformChildren(IrBlockBodyImpl.kt:49) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:93) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:99) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:100) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.accept(IrBlockBodyImpl.kt:40) at org.jetbrains.kotlin.ir.expressions.IrBody$DefaultImpls.transform(IrBody.kt:24) at org.jetbrains.kotlin.ir.expressions.IrBlockBody$DefaultImpls.transform(IrBody.kt) at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transform(IrBlockBodyImpl.kt:26) at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionBase.transformChildren(IrFunctionBase.kt:77) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunction(IrElementTransformerVoid.kt:55) at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitFunction(ComposableCallTransformer.kt:205) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:58) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:59) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.accept(IrFunctionImpl.kt:89) at org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42) at org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27) at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.transformChildren(IrFileImpl.kt:71) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288) at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.lower(ComposableCallTransformer.kt:197) at org.jetbrains.kotlin.backend.common.LowerKt.lower(Lower.kt:66) at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:235) at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:228) at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:128) at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24) at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127) at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29) at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:42) at org.jetbrains.kotlin.backend.jvm.JvmLower.lower(JvmLower.kt:288) at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:91) ... 38 more Task :app:javaPreCompileDebug FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:compileDebugKotlin'. Internal compiler error. See log for more details Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org BUILD FAILED in 15s 12 actionable tasks: 12 executed Can someone help me with this issue?
In your module's build.gradle file, make sure that you have this in your android closure: buildFeatures { compose true } composeOptions { kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129" kotlinCompilerExtensionVersion "0.1.0-dev04" } My guess is that you are missing the composeOptions.
DrawImage() is part of androidx.ui:ui-foundation. Open the build.gradle (Module: app) file and add the following line to the list of dependencies: dependencies { ... implementation 'androidx.ui:ui-foundation:0.1.0-dev03' } I would recommend following Jetpack Compose Basics - Codelab, a more comprehensive tutorial by Google.
You can see the latest composeOptions for the correct build here. But keep in mind that the library API can vary greatly from version to version, and it would be better to take a look at the official example to examine the use of the Compose library. Don't forget to switch the repository to the right branch corresponding to the latest version of the library (for example, at the time of the answer it's dev05 branch).
Firebase Messaging Package for Unity gives problems when building with Gradle
At first I could build and install the app on my Android device but as I launched it crashed, the Logcat was saying that a Firebase library was not included in the package and advising to use the Play Services Jar Resolver. So I used it. Now I have this error when trying to build my app. (excuse me, I had some issues understanding how to insert a code snippet :) ) CommandInvokationFailure: Gradle build failed. /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease" stderr[ /Users/andreamarchetti/Desktop/Squarcuit/Temp/gradleOut/src/main/AndroidManifest.xml:4: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode] <application android:icon="#drawable/app_icon" android:label="#string/app_name" android:debuggable="false" android:isGame="true" android:banner="#drawable/app_banner"> Explanation for issues of type "HardcodedDebugMode": It's best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false. If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information. 1 errors, 0 warnings Dex: Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334) at com.android.dx.command.dexer.Main.run(Main.java:277) at com.android.dx.command.dexer.Main.main(Main.java:245) at com.android.dx.command.Main.main(Main.java:106) FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':transformClassesWithDexForRelease'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ] stdout[ Incremental java compilation is an incubating feature. :preBuild UP-TO-DATE :preReleaseBuild UP-TO-DATE :checkReleaseManifest :preDebugBuild UP-TO-DATE :Firebase:preBuild UP-TO-DATE :Firebase:preReleaseBuild UP-TO-DATE :Firebase:compileReleaseNdk UP-TO-DATE :Firebase:compileLint :Firebase:copyReleaseLint UP-TO-DATE :Firebase:mergeReleaseProguardFiles :Firebase:packageReleaseRenderscript UP-TO-DATE :Firebase:checkReleaseManifest :Firebase:prepareReleaseDependencies :Firebase:compileReleaseRenderscript :Firebase:generateReleaseResValues :Firebase:generateReleaseResources :Firebase:packageReleaseResources :Firebase:compileReleaseAidl :Firebase:generateReleaseBuildConfig :Firebase:mergeReleaseShaders :Firebase:compileReleaseShaders :Firebase:generateReleaseAssets :Firebase:mergeReleaseAssets :Firebase:processReleaseManifest :Firebase:processReleaseResources :Firebase:generateReleaseSources :Firebase:incrementalReleaseJavaCompilationSafeguard :Firebase:compileReleaseJavaWithJavac :Firebase:processReleaseJavaRes UP-TO-DATE :Firebase:transformResourcesWithMergeJavaResForRelease :Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease :Firebase:mergeReleaseJniLibFolders :Firebase:transformNative_libsWithMergeJniLibsForRelease :Firebase:transformNative_libsWithSyncJniLibsForRelease :Firebase:bundleRelease :prepareAnimatedVectorDrawable2340Library :prepareAppcompatV72340Library :prepareCardviewV72340Library :prepareCustomtabs2340Library :prepareFacebookAndroidSdk4170Library :prepareFacebookAndroidWrapper794Library :prepareFirebaseAppUnity401Library :prepareFirebaseCommon1100Library :prepareFirebaseIid1100Library :prepareFirebaseMessaging1100Library :prepareFirebaseMessagingUnity401Library :prepareGradleOutFirebaseUnspecifiedLibrary :preparePlayServicesBase1100Library :preparePlayServicesBasement1100Library :preparePlayServicesTasks1100Library :prepareSupportCompat2520Library :prepareSupportCoreUi2520Library :prepareSupportCoreUtils2520Library :prepareSupportFragment2520Library :prepareSupportMediaCompat2520Library :prepareSupportV42340Library :prepareSupportV42520Library :prepareSupportVectorDrawable2340Library :prepareReleaseDependencies :compileReleaseAidl :compileReleaseRenderscript :generateReleaseBuildConfig :mergeReleaseShaders :compileReleaseShaders :generateReleaseAssets :mergeReleaseAssets :generateReleaseResValues :generateReleaseResources :mergeReleaseResources :processReleaseManifest :processReleaseResources :generateReleaseSources :incrementalReleaseJavaCompilationSafeguard :compileReleaseJavaWithJavac :compileReleaseNdk UP-TO-DATE :compileReleaseSources :lintVitalRelease :prePackageMarkerForRelease :transformClassesWithDexForRelease To run dex in process, the Gradle daemon needs a larger heap. It currently has approximately 910 MB. For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB. To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties. For more information see https://docs.gradle.org/current/userguide/build_environment.html :transformClassesWithDexForRelease FAILED BUILD FAILED Total time: 45.841 secs ] exit code: 1 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.HostView:OnGUI() I do not have - android:debuggable="false" -anywhere in any AndroidManifest.xml in my project.
I think the problem was that I had multiple .aar files of the same package but different versions. So Facebook SDK was conflicting with some Google Firebase stuff. I deleted the Facebook SDK .aar (which were older versions).
dexDebugTest fails with DexException "Cannot merge new index" for test
I'm building an android project with gradle that leverages Google Espresso (much thanks to Jake Wharton's double espresso). With my build.gradle configuration I can successfully build debug and release versions using proguard to optimize my method counts (to get below the 65k limit), but when I run connectedAndroidTest my build fails with: ... :src:MyApp:proguardDebug UP-TO-DATE :src:MyApp:proguardDebugTest UP-TO-DATE :src:MyApp:dexDebugTest UP-TO-DATE :src:MyAppLibrary:prepareDebugTestDependencies :src:MyAppLibrary:compileDebugTestAidl UP-TO-DATE :src:MyAppLibrary:copyDebugLint UP-TO-DATE :src:MyAppLibrary:mergeDebugProguardFiles UP-TO-DATE :src:MyAppLibrary:checkDebugManifest :src:MyAppLibrary:prepareDebugDependencies :src:MyAppLibrary:compileDebugAidl UP-TO-DATE :src:MyAppLibrary:compileDebugRenderscript UP-TO-DATE :src:MyAppLibrary:generateDebugBuildConfig UP-TO-DATE :src:MyAppLibrary:generateDebugAssets UP-TO-DATE :src:MyAppLibrary:mergeDebugAssets UP-TO-DATE :src:MyAppLibrary:generateDebugResValues UP-TO-DATE :src:MyAppLibrary:generateDebugResources UP-TO-DATE :src:MyAppLibrary:mergeDebugResources UP-TO-DATE :src:MyAppLibrary:processDebugManifest UP-TO-DATE :src:MyAppLibrary:processDebugResources UP-TO-DATE :src:MyAppLibrary:generateDebugSources UP-TO-DATE :src:MyAppLibrary:compileDebugJava UP-TO-DATE :src:MyAppLibrary:processDebugJavaRes UP-TO-DATE :src:MyAppLibrary:packageDebugJar UP-TO-DATE :src:MyAppLibrary:compileDebugNdk UP-TO-DATE :src:MyAppLibrary:packageDebugJniLibs UP-TO-DATE :src:MyAppLibrary:packageDebugLocalJar UP-TO-DATE :src:MyAppLibrary:packageDebugRenderscript UP-TO-DATE :src:MyAppLibrary:packageDebugResources UP-TO-DATE :src:MyAppLibrary:bundleDebug :src:MyAppLibrary:assembleDebug :src:MyAppLibrary:processDebugTestManifest UP-TO-DATE :src:MyAppLibrary:compileDebugTestRenderscript UP-TO-DATE :src:MyAppLibrary:generateDebugTestBuildConfig UP-TO-DATE :src:MyAppLibrary:generateDebugTestAssets UP-TO-DATE :src:MyAppLibrary:mergeDebugTestAssets UP-TO-DATE :src:MyAppLibrary:generateDebugTestResValues UP-TO-DATE :src:MyAppLibrary:generateDebugTestResources UP-TO-DATE :src:MyAppLibrary:mergeDebugTestResources UP-TO-DATE :src:MyAppLibrary:processDebugTestResources UP-TO-DATE :src:MyAppLibrary:generateDebugTestSources UP-TO-DATE :src:MyAppLibrary:compileDebugTestJava UP-TO-DATE :src:MyAppLibrary:preDexDebugTest UP-TO-DATE :src:MyAppLibrary:dexDebugTest UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Cannot merge new index 65623 into a non-jumbo instruction! at com.android.dx.merge.InstructionTransformer.jumboCheck(InstructionTransformer.java:108) at com.android.dx.merge.InstructionTransformer.access$800(InstructionTransformer.java:25) at com.android.dx.merge.InstructionTransformer$StringVisitor.visit(InstructionTransformer.java:71) at com.android.dx.io.CodeReader.callVisit(CodeReader.java:114) at com.android.dx.io.CodeReader.visitAll(CodeReader.java:89) at com.android.dx.merge.InstructionTransformer.transform(InstructionTransformer.java:48) at com.android.dx.merge.DexMerger.transformCode(DexMerger.java:840) at com.android.dx.merge.DexMerger.transformMethods(DexMerger.java:811) at com.android.dx.merge.DexMerger.transformClassData(DexMerger.java:784) at com.android.dx.merge.DexMerger.transformClassDef(DexMerger.java:680) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:540) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103) :src:MyAppLibrary:dexDebugTest FAILED My app is called MyApp and it has a dependency project called MyAppLibrary. Before switching to espresso I didn't hit the 65k limit when running connectedAndroidTest. I used robotium before and I've since removed those dependencies. Also, I don't hit the limit when I just build a debug or release build. Is there a way to optimize my test build like I am optimizing my debug build? The odd thing to me is that I only have tests in MyApp, I don't have any test classes in MyAppLibrary. In fact, when I run connectedAndroidTest, I can actually see my tests running on my device and passing before it gets to MyAppLibrary:dexDebugTest. So any idea why it would fail there after running my tests? Alternatively, would it be possible to somehow bypass calling the connectedAndroidTest dependency chain for MyAppLibrary? Thanks!
In the build.gradle You need to specify: android { dexOptions { jumboMode true } }