Getting error in Jenkins, while building the project.These are following error "The process cannot access the file because it is being used by another process."
Building on master in workspace D:\Jenkins\jobs\App\workspace
Cleaning local Directory.
java.nio.file.FileSystemException:
D:\Jenkins\jobs\App\workspace\.\app\app.properties: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
at java.nio.file.Files.delete(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2180.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.deleteFile(Util.java:255)
at hudson.Util.deleteRecursive(Util.java:318)
at hudson.Util.deleteContentsRecursive(Util.java:220)
at hudson.Util.deleteRecursive(Util.java:309)
at hudson.Util.deleteContentsRecursive(Util.java:220)
at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Archiving artifacts
Finished: FAILURE
What does this mean, and what can I do about it?
in job configuration page delete workspace option is there. click that option before running the job. Or else if master-slave then check the same file has been used by differ
Related
When i open uiatuomator in terminal it works fine but as soon as i click on uiautomator to connect to the emulator i get this exception
Android API- 29
Exception on Terminal :
Unhandled event loop exception during blocked modal context.
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at com.android.uiautomator.actions.ScreenshotAction.run(ScreenshotAction.java:85)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.android.uiautomator.UiAutomatorViewer.main(UiAutomatorViewer.java:78)
Caused by: java.lang.NullPointerException
at org.eclipse.swt.widgets.Control.internal_new_GC(Unknown Source)
at org.eclipse.swt.graphics.GC.<init>(Unknown Source)
at org.eclipse.swt.graphics.GC.<init>(Unknown Source)
at org.eclipse.jface.dialogs.Dialog.shortenText(Dialog.java:349)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.setMessage(ProgressMonitorDialog.java:652)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.access$3(ProgressMonitorDialog.java:644)
at org.eclipse.jface.dialogs.ProgressMonitorDialog$3.run(ProgressMonitorDialog.java:406)
at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
... 22 more
this problem is happening for java SDK version. I had java version 1.8.262 and I got multiple problems even setting up the path variables properly. you can try...
after changing the java version and setting up the path variable properly. I got that it's working.
Downgrade your Java version to "1.8.0_231" you can get here: https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html
set the env in your bash_profile. to do that - go to MAC DISK and find ".bash_profile" Open,edit and put the path
example:
export ANDROID_HOME=~/Library/Android/sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:$JAVA_HOME/lib
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/build-tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/tools/lib/x86_64
quit the terminal and reopen type "uiautomatorviewer" and hit enter
that it.
Sidenote - this post is similar (but not identical) to compileReleaseKotlin fails with java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context, but I thought I'd make my own post with more details about my situation in order to get the best feedback possible. Also, I tried all the solutions in that post, and none of them worked.
I am trying to generate an unsigned release APK for my app. To do that, I use the command gradlew assembleRelease.
I get the following error:
Caught an exception trying to connect to Kotlin Daemon
java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at org.jetbrains.kotlin.gradle.tasks.JarSearchingUtilKt.findToolsJ
ar(jarSearchingUtil.kt:79)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment$t
oolsJar$2.invoke(GradleCompilerEnvironment.kt:20)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment$t
oolsJar$2.invoke(GradleCompilerEnvironment.kt:14)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment.g
etToolsJar(GradleCompilerEnvironment.kt)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment.g
etCompilerFullClasspath(GradleCompilerEnvironment.kt:23)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.getDae
monConnection(GradleKotlinCompilerRunner.kt:336)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eWithDaemon(GradleKotlinCompilerRunner.kt:181)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:156)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:53)
at org.jetbrains.kotlin.compilerRunner.KotlinCompilerRunner.runCom
piler(KotlinCompilerRunner.kt:127)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvm
Compiler(GradleKotlinCompilerRunner.kt:108)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$ko
tlin_gradle_plugin(Tasks.kt:378)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$ko
tlin_gradle_plugin(Tasks.kt:253)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute
(Tasks.kt:215)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.inv
oke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:7
3)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskActi
on.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.exec
ute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(
DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreating
TaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecute
r.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachin
gStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.
execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTas
kExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExec
uter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStat
eTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsEx
ecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.
execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskEx
ecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecu
ter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.exec
ute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(
DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute
(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute
WithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFai
lures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(Manage
dExecutorImpl.java:46)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unk
nown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Un
known Source)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadR
unnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Unknown Source)
Could not perform incremental compilation: Could not connect to Kotlin com
pile daemon
Could not connect to kotlin daemon. Using fallback strategy.
e: java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at org.jetbrains.kotlin.gradle.tasks.JarSearchingUtilKt.findToolsJ
ar(jarSearchingUtil.kt:79)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment$t
oolsJar$2.invoke(GradleCompilerEnvironment.kt:20)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment$t
oolsJar$2.invoke(GradleCompilerEnvironment.kt:14)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment.g
etToolsJar(GradleCompilerEnvironment.kt)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment.g
etCompilerFullClasspath(GradleCompilerEnvironment.kt:23)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eOutOfProcess(GradleKotlinCompilerRunner.kt:303)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:171)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compil
eWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:53)
at org.jetbrains.kotlin.compilerRunner.KotlinCompilerRunner.runCom
piler(KotlinCompilerRunner.kt:127)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvm
Compiler(GradleKotlinCompilerRunner.kt:108)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$ko
tlin_gradle_plugin(Tasks.kt:378)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$ko
tlin_gradle_plugin(Tasks.kt:253)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute
(Tasks.kt:215)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.inv
oke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:7
3)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskActi
on.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.exec
ute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(
DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecu
ter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreating
TaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecute
r.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachin
gStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.
execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTas
kExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExec
uter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStat
eTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsEx
ecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.
execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskEx
ecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecu
ter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$Runn
ableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.exec
ute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(
DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFi
ringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute
(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute
WithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExec
utorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFai
lures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(Manage
dExecutorImpl.java:46)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unk
nown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Un
known Source)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadR
unnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Unknown Source)
Here's some more information about my current situation:
I'm using Windows 10.
This is the result of gradlew assembleRelease --scan. It contains a lot of detailed information that could be useful for debugging.
https://scans.gradle.com/s/sohrhovsc676e/
In Android Studio, I went to "File -> Project Structure" and changed my JDK location from
"C:\Program Files\Android\Android Studio\jre" (embedded JDK)
to
"C:\Program Files\Java\jdk1.8.0_172" (JDK 8), which I got from here.
This failed to solve the problem.
I have also added "C:\Program Files\Java\jdk1.8.0_172\bin" to my System Path variable.
I also uploaded my project to Github, incase anyone needs to see it.
https://github.com/vedantroy/recyclerview-test
Also, I previously tried replacing implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" with implementation"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version", but that didn't work either.
Edit 1 -
I tried switching my Build Variant to "release" and then building an APK and that seemed to work. However, I'm not sure if that produces the same result as gradlew assembleRelease
In my case, this started happening after a Java update. It turns out the JRE was updated but the JDK was not.
Try: install the new JDK update, uninstall old versions, and reopen any shell/ps/cmd sessions/windows. It may be necessary to kill existing Gradle daemons but it should be smart enough not to reuse them. Try your build again!
For a project I am writing Selenium test cases for automation. On the other hand for other project I am designing a page in Android.
I have created some part of page in Android and now need to finish Selenium test cases. But as soon as I run one big error came. Then I thought that I have to change my workspace and kept Selenium test cases in another work space even then error is coming (different error).
Below is the error after changing workspace:
org.testng.TestNGException: Cannot find class in classpath: inventory
at org.testng.xml.XmlClass.loadClass(XmlClass.java:81) at
org.testng.xml.XmlClass.init(XmlClass.java:73) at
org.testng.xml.XmlClass.<init>(XmlClass.java:59) at
org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown
Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at
org.testng.xml.XMLParser.parse(XMLParser.java:39) at
org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17) at
org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10) at
org.testng.xml.Parser.parse(Parser.java:168) at
org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311) at
org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88) at
org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at
org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Yes. You can create both projects in same work space.
How to download android gradle project dependencies to custom folder?
I cannot save or read *.exe files in my home folder in my work enviroment under Windows (due security reason and corporate policy)
How to resolve exception thrown by gradle when I try to build or import in IDE Android project?
I tried to change Gradle user home, but it didn't help.
Caused by: java.io.FileNotFoundException: \\{my-company-url-for-user-home}\android-sdk-windows\SDK Manager.exe (Access is denied)
at org.rauschig.jarchivelib.IOUtils.copy(IOUtils.java:50)
at org.rauschig.jarchivelib.CommonsArchiver.extract(CommonsArchiver.java:83)
at org.rauschig.jarchivelib.Archiver$extract.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkDownload.download(SdkDownload.groovy:57)
at com.jakewharton.sdkmanager.internal.SdkDownload$download$0.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.Downloader$Real.download(Downloader.groovy:8)
at com.jakewharton.sdkmanager.internal.Downloader$download.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.downloadSdk(SdkResolver.groovy:95)
at com.jakewharton.sdkmanager.internal.SdkResolver$downloadSdk$1.callCurrent(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.resolve(SdkResolver.groovy:87)
at com.jakewharton.sdkmanager.internal.SdkResolver$resolve$0.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.resolve(SdkResolver.groovy:17)
at com.jakewharton.sdkmanager.internal.SdkResolver$resolve.call(Unknown Source)
at com.jakewharton.sdkmanager.SdkManagerPlugin$_apply_closure1.doCall(SdkManagerPlugin.groovy:27)
at com.jakewharton.sdkmanager.SdkManagerPlugin$_apply_closure1.doCall(SdkManagerPlugin.groovy)
at com.jakewharton.sdkmanager.SdkManagerPlugin.time(SdkManagerPlugin.groovy:45)
at com.jakewharton.sdkmanager.SdkManagerPlugin$time$0.callCurrent(Unknown Source)
at com.jakewharton.sdkmanager.SdkManagerPlugin.apply(SdkManagerPlugin.groovy:26)
at com.jakewharton.sdkmanager.SdkManagerPlugin.apply(SdkManagerPlugin.groovy)
at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:110)
at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:69)
at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:35)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:117)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:85)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:130)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:41)
at org.gradle.api.Project$apply$2.call(Unknown Source)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_1nbccshuhk647b9aqa26vge5lo.run(C:\Projects\Android\core\build.gradle:1)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
... 54 more
To gather all the dependencies, you can just “copy” the configuration that represents the dependencies you want.
For example, to copy all the compile time and runtime dependencies you could do something like:
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}
you can also use gradle.user.home system property property or --gradle-user-home command line property
I found solution while reading debug logs:
Set up ANDROID_HOME enviroment variable
13:18:32.382 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkResolver] Missing l
ocal.properties.
13:18:32.395 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkResolver] Missing A
NDROID_HOME.
13:18:32.406 [LIFECYCLE] [com.jakewharton.sdkmanager.internal.SdkResolver] Andro
id SDK not found. Downloading...
13:18:32.425 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkDownload] Downloadi
ng SDK from http://dl.google.com/android/android-sdk_r23-windows.zip.
I'm having an issue where my game compiles to android and desktop but is getting a runtime error saying it can't find any of the files in the package walljumper.tools. It gets all the way to the loading screen, loads and then says this in the browser
GwtApplication: exception: walljumper/tools/Assets
walljumper/tools/Assets
and says this in the console
java.lang.NoClassDefFoundError: walljumper/tools/Assets
at com.me.walljumper.WallJumper.create(WallJumper.java:23)
at com.badlogic.gdx.backends.gwt.GwtApplication.setupLoop(GwtApplication.java:177)
at com.badlogic.gdx.backends.gwt.GwtApplication$1$1.update(GwtApplication.java:138)
at com.badlogic.gdx.backends.gwt.preloader.Preloader$1$1.onSuccess(Preloader.java:184)
at com.badlogic.gdx.backends.gwt.preloader.AssetDownloader$4$1.onEvent(AssetDownloader.java:171)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: walljumper.tools.Assets
at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1090)
at com.google.gwt.dev.shell.CompilingClassLoader.loadClass(CompilingClassLoader.java:1196)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
Thanks in advance
In your Something.gwt.xml in your shared project do you correctly list the translatable source packages?
<module>
<source path="walljumper/" />
</module>