Android build fails when use class from jar in static constant -


i have jar file included in project. when project compiles - works fine.

but if want make this:

class myappclass {     private static final string base_test_url = constants.gettesturl(); } 

where constants class jar - build fails.
i can provide stacktrace, it's long , non-informative (as me).

i believe might due this.
tried make static init or make static method returning values - no help.

is way solve such issue?

ps. tried find how change build order (in order build jar first) - no luck.

pps. here stacktrace:

* exception is: org.gradle.api.tasks.taskexecutionexception: execution failed task ':app:compiledebugjavawithjavac'.     @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.executeactions(executeactionstaskexecuter.java:84)     @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.execute(executeactionstaskexecuter.java:55)     @ org.gradle.api.internal.tasks.execution.skipuptodatetaskexecuter.execute(skipuptodatetaskexecuter.java:62)     @ org.gradle.api.internal.tasks.execution.validatingtaskexecuter.execute(validatingtaskexecuter.java:58)     @ org.gradle.api.internal.tasks.execution.skipemptysourcefilestaskexecuter.execute(skipemptysourcefilestaskexecuter.java:88)     @ org.gradle.api.internal.tasks.execution.resolvetaskartifactstatetaskexecuter.execute(resolvetaskartifactstatetaskexecuter.java:46)     @ org.gradle.api.internal.tasks.execution.skiptaskwithnoactionsexecuter.execute(skiptaskwithnoactionsexecuter.java:51)     @ org.gradle.api.internal.tasks.execution.skiponlyiftaskexecuter.execute(skiponlyiftaskexecuter.java:54)     @ org.gradle.api.internal.tasks.execution.executeatmostoncetaskexecuter.execute(executeatmostoncetaskexecuter.java:43)     @ org.gradle.api.internal.tasks.execution.catchexceptiontaskexecuter.execute(catchexceptiontaskexecuter.java:34)     @ org.gradle.execution.taskgraph.defaulttaskgraphexecuter$eventfiringtaskworker$1.execute(defaulttaskgraphexecuter.java:236)     @ org.gradle.execution.taskgraph.defaulttaskgraphexecuter$eventfiringtaskworker$1.execute(defaulttaskgraphexecuter.java:228)     @ org.gradle.internal.transformers$4.transform(transformers.java:169)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:106)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:61)     @ org.gradle.execution.taskgraph.defaulttaskgraphexecuter$eventfiringtaskworker.execute(defaulttaskgraphexecuter.java:228)     @ org.gradle.execution.taskgraph.defaulttaskgraphexecuter$eventfiringtaskworker.execute(defaulttaskgraphexecuter.java:215)     @ org.gradle.execution.taskgraph.abstracttaskplanexecutor$taskexecutorworker.processtask(abstracttaskplanexecutor.java:77)     @ org.gradle.execution.taskgraph.abstracttaskplanexecutor$taskexecutorworker.run(abstracttaskplanexecutor.java:58)     @ org.gradle.execution.taskgraph.defaulttaskplanexecutor.process(defaulttaskplanexecutor.java:32)     @ org.gradle.execution.taskgraph.defaulttaskgraphexecuter.execute(defaulttaskgraphexecuter.java:113)     @ org.gradle.execution.selectedtaskexecutionaction.execute(selectedtaskexecutionaction.java:37)     @ org.gradle.execution.defaultbuildexecuter.execute(defaultbuildexecuter.java:37)     @ org.gradle.execution.defaultbuildexecuter.access$000(defaultbuildexecuter.java:23)     @ org.gradle.execution.defaultbuildexecuter$1.proceed(defaultbuildexecuter.java:43)     @ org.gradle.execution.dryrunbuildexecutionaction.execute(dryrunbuildexecutionaction.java:32)     @ org.gradle.execution.defaultbuildexecuter.execute(defaultbuildexecuter.java:37)     @ org.gradle.execution.defaultbuildexecuter.execute(defaultbuildexecuter.java:30)     @ org.gradle.initialization.defaultgradlelauncher$3.execute(defaultgradlelauncher.java:196)     @ org.gradle.initialization.defaultgradlelauncher$3.execute(defaultgradlelauncher.java:193)     @ org.gradle.internal.transformers$4.transform(transformers.java:169)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:106)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:56)     @ org.gradle.initialization.defaultgradlelauncher.dobuildstages(defaultgradlelauncher.java:193)     @ org.gradle.initialization.defaultgradlelauncher.dobuild(defaultgradlelauncher.java:119)     @ org.gradle.initialization.defaultgradlelauncher.run(defaultgradlelauncher.java:102)     @ org.gradle.launcher.exec.gradlebuildcontroller.run(gradlebuildcontroller.java:71)     @ org.gradle.tooling.internal.provider.runner.buildmodelactionrunner.run(buildmodelactionrunner.java:50)     @ org.gradle.launcher.exec.chainingbuildactionrunner.run(chainingbuildactionrunner.java:35)     @ org.gradle.tooling.internal.provider.runner.runasbuildoperationbuildactionrunner$1.execute(runasbuildoperationbuildactionrunner.java:43)     @ org.gradle.tooling.internal.provider.runner.runasbuildoperationbuildactionrunner$1.execute(runasbuildoperationbuildactionrunner.java:40)     @ org.gradle.internal.transformers$4.transform(transformers.java:169)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:106)     @ org.gradle.internal.progress.defaultbuildoperationexecutor.run(defaultbuildoperationexecutor.java:56)     @ org.gradle.tooling.internal.provider.runner.runasbuildoperationbuildactionrunner.run(runasbuildoperationbuildactionrunner.java:40)     @ org.gradle.tooling.internal.provider.runner.subscribablebuildactionrunner.run(subscribablebuildactionrunner.java:75)     @ org.gradle.launcher.exec.chainingbuildactionrunner.run(chainingbuildactionrunner.java:35)     @ org.gradle.launcher.exec.inprocessbuildactionexecuter.execute(inprocessbuildactionexecuter.java:41)     @ org.gradle.launcher.exec.inprocessbuildactionexecuter.execute(inprocessbuildactionexecuter.java:26)     @ org.gradle.tooling.internal.provider.continuousbuildactionexecuter.execute(continuousbuildactionexecuter.java:75)     @ org.gradle.tooling.internal.provider.continuousbuildactionexecuter.execute(continuousbuildactionexecuter.java:49)     @ org.gradle.tooling.internal.provider.servicessetupbuildactionexecuter.execute(servicessetupbuildactionexecuter.java:44)     @ org.gradle.tooling.internal.provider.servicessetupbuildactionexecuter.execute(servicessetupbuildactionexecuter.java:29)     @ org.gradle.launcher.daemon.server.exec.executebuild.dobuild(executebuild.java:67)     @ org.gradle.launcher.daemon.server.exec.buildcommandonly.execute(buildcommandonly.java:36)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.watchfordisconnection.execute(watchfordisconnection.java:47)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.resetdeprecationlogger.execute(resetdeprecationlogger.java:26)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.requeststopifsingleuseddaemon.execute(requeststopifsingleuseddaemon.java:34)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.forwardclientinput$2.call(forwardclientinput.java:74)     @ org.gradle.launcher.daemon.server.exec.forwardclientinput$2.call(forwardclientinput.java:72)     @ org.gradle.util.swapper.swap(swapper.java:38)     @ org.gradle.launcher.daemon.server.exec.forwardclientinput.execute(forwardclientinput.java:72)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.logandcheckhealth.execute(logandcheckhealth.java:55)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.logtoclient.dobuild(logtoclient.java:60)     @ org.gradle.launcher.daemon.server.exec.buildcommandonly.execute(buildcommandonly.java:36)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.establishbuildenvironment.dobuild(establishbuildenvironment.java:72)     @ org.gradle.launcher.daemon.server.exec.buildcommandonly.execute(buildcommandonly.java:36)     @ org.gradle.launcher.daemon.server.api.daemoncommandexecution.proceed(daemoncommandexecution.java:120)     @ org.gradle.launcher.daemon.server.exec.startbuildorrespondwithbusy$1.run(startbuildorrespondwithbusy.java:50)     @ org.gradle.launcher.daemon.server.daemonstatecoordinator$1.run(daemonstatecoordinator.java:297)     @ org.gradle.internal.concurrent.executorpolicy$catchandrecordfailures.onexecute(executorpolicy.java:54)     @ org.gradle.internal.concurrent.stoppableexecutorimpl$1.run(stoppableexecutorimpl.java:40) caused by: org.gradle.api.internal.tasks.compile.compilationfailedexception: compilation failed; see compiler error output details.     @ org.gradle.api.internal.tasks.compile.jdkjavacompiler.execute(jdkjavacompiler.java:48)     @ org.gradle.api.internal.tasks.compile.jdkjavacompiler.execute(jdkjavacompiler.java:33)     @ org.gradle.api.internal.tasks.compile.normalizingjavacompiler.delegateandhandleerrors(normalizingjavacompiler.java:104)     @ org.gradle.api.internal.tasks.compile.normalizingjavacompiler.execute(normalizingjavacompiler.java:53)     @ org.gradle.api.internal.tasks.compile.normalizingjavacompiler.execute(normalizingjavacompiler.java:38)     @ org.gradle.api.internal.tasks.compile.cleaningjavacompilersupport.execute(cleaningjavacompilersupport.java:35)     @ org.gradle.api.internal.tasks.compile.cleaningjavacompilersupport.execute(cleaningjavacompilersupport.java:25)     @ org.gradle.api.tasks.compile.javacompile.performcompilation(javacompile.java:206)     @ org.gradle.api.tasks.compile.javacompile.compile(javacompile.java:187)     @ org.gradle.api.tasks.compile.javacompile.compile(javacompile.java:130)     @ com.android.build.gradle.tasks.factory.androidjavacompile.compile(androidjavacompile.java:49)     @ org.gradle.internal.reflect.javamethod.invoke(javamethod.java:73)     @ org.gradle.api.internal.project.taskfactory.defaulttaskclassinfostore$incrementaltaskaction.doexecute(defaulttaskclassinfostore.java:163)     @ org.gradle.api.internal.project.taskfactory.defaulttaskclassinfostore$standardtaskaction.execute(defaulttaskclassinfostore.java:134)     @ org.gradle.api.internal.project.taskfactory.defaulttaskclassinfostore$standardtaskaction.execute(defaulttaskclassinfostore.java:123)     @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.executeaction(executeactionstaskexecuter.java:95)     @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.executeactions(executeactionstaskexecuter.java:76) 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -