Okay, new to Android. Fresh install, Windows 10, basic template project with an empty activity. When I start the project it starts gradle sync and starts generating logs in my gradle home with the following error
org.gradle.api.UncheckedIOException: java.io.IOException: Unable to establish loopback connection
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
at org.gradle.internal.remote.internal.inet.SocketConnection.<init>(SocketConnection.java:60)
at org.gradle.internal.remote.internal.inet.SocketConnectCompletion.create(SocketConnectCompletion.java:39)
at org.gradle.launcher.daemon.server.DaemonTcpServerConnector$1.execute(DaemonTcpServerConnector.java:73)
at org.gradle.launcher.daemon.server.DaemonTcpServerConnector$1.execute(DaemonTcpServerConnector.java:69)
at org.gradle.internal.remote.internal.inet.TcpIncomingConnector$Receiver.run(TcpIncomingConnector.java:112)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:101)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:68)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:170)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at java.nio.channels.Selector.open(Selector.java:227)
at org.gradle.internal.remote.internal.inet.SocketConnection$SocketInputStream.<init>(SocketConnection.java:142)
at org.gradle.internal.remote.internal.inet.SocketConnection.<init>(SocketConnection.java:58)
... 9 more
Caused by: java.net.SocketException: Permission denied: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:130)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:83)
... 19 more
I get the same error when I run the basic gradle command against the gradlew.bat file, but when I run set _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true first then it starts the daemon successfully. Question is, how do I use that information to make the gradle sync on the project work. I've tried adding -Djava.net.preferIPv4Stack=true to the gradle.properties file, tried adding set _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true to the projects gradle batch file, and now I'm out of options.
Okay, finally figured it out. I went to environment variables and set a _JAVA_OPTS user variable with -Djava.net.preferIPv4Stack=true as the value.
Related
When attempting to run the pdm-outbound (Aries2 app) repo, we are getting the following error. This is a new error and was not occurring last week. I have conformed that devtools is up to date and rebuilt gradle. Does anyone have any recommendations?
java.lang.NoClassDefFoundError: com/availity/aries/core/queue/QueueStorage
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2699)
at java.lang.Class.getConstructor0(Class.java:3103)
at java.lang.Class.newInstance(Class.java:412)
at com.availity.aries.core.plugin.Plugins.init(Plugins.java:207)
at com.availity.aries.Aries.start(Aries.java:259)
at com.availity.aries.Aries.bootstrap(Aries.java:146)
at com.availity.aries.Aries.main(Aries.java:74)
Caused by: java.lang.ClassNotFoundException: com.availity.aries.core.queue.QueueStorage
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 8 more
I recreated this issue on my local. It appears like there is some issue with
com.availity.aries.core:vault:3.3.0-SNAPSHOT
So, the immediate fix would be to revert to the previous version i.e
com.availity.aries.core:vault:3.2.0-SNAPSHOT
Navigate to the devtools folder on your local machine and locate the file launcher.gradle line 57 . Revert it to the previous version as indicated above. Once this is done, execute the command
./gradle.sh clean compileJava launcher
The app should run without the error. The concerned team would look into this and get a fix ASAP.
Using GOCD pipeline. We have two nodes, one of which clones code fine, this older node does not. We are seeing Cannot run program "git": error=11, Resource temporarily unavailable in the logs. Is there some configuration I am able to check?
Logs:
020-08-25 17:39:18,629 [loopThread] ERROR thoughtworks.go.work.DefaultGoPublisher:135 - Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git#github.comcast.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build]
Make sure this command can execute manually.
java.lang.RuntimeException: Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git#example.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build]
Make sure this command can execute manually.
at com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:36)
at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:159)
at com.thoughtworks.go.domain.MaterialRevision.updateTo(MaterialRevision.java:151)
at com.thoughtworks.go.domain.materials.AbstractMaterialAgent.prepare(AbstractMaterialAgent.java:41)
at com.thoughtworks.go.remote.work.BuildWork.prepareJob(BuildWork.java:193)
at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:141)
at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:96)
at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:60)
at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:123)
at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:99)
at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:78)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65)
at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: com.thoughtworks.go.util.command.CommandLineException: Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git#example.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build]
Make sure this command can execute manually.
at com.thoughtworks.go.util.ProcessManager.startProcess(ProcessManager.java:112)
at com.thoughtworks.go.util.ProcessManager.createProcess(ProcessManager.java:64)
at com.thoughtworks.go.util.command.CommandLine.createProcess(CommandLine.java:361)
at com.thoughtworks.go.util.command.CommandLine.execute(CommandLine.java:354)
at com.thoughtworks.go.util.command.CommandLine.run(CommandLine.java:513)
at com.thoughtworks.go.domain.materials.SCMCommand.run(SCMCommand.java:34)
at com.thoughtworks.go.domain.materials.git.GitCommand.clone(GitCommand.java:82)
at com.thoughtworks.go.config.materials.git.GitMaterial.git(GitMaterial.java:247)
at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:153)
... 17 more
Caused by: java.io.IOException: Cannot run program "git": error=11, Resource temporarily unavailable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.thoughtworks.go.util.ProcessManager.startProcess(ProcessManager.java:105)
... 25 more
Caused by: java.io.IOException: error=11, Resource temporarily unavailable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
GO CD Build:
20:21:26.207 [go] Job Started: 2020-08-25 20:21:26 UTC
20:21:26.207 [go] Start to prepare PATGUI-build/131/Execute_Script/1/build_job on exmaple-po-b4p.sys.comcast.net [/app/go-agent3]
20:21:26.212 [go] Start to update materials.
20:21:26.212 [go] Start updating files at revision 1c9e6a31946f62af1285305f338178d2a8fd13f2 from git#github.comcast.com:TPP-Provisioning/PortOutGui.git
20:21:26.214 Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git#example.com:TPP-Provisioning/PortOutGui.git /app/go-agent3/pipelines/PATGUI-build]
Make sure this command can execute manually.
20:21:26.231 [go] Job completed PATGUI-build/131/Execute_Script/1/build_job on exmaple-po-b4p.sys.comcast.net [/app/go-agent3]
This issue was resolved by restarting the go agent. A new issue arouse but this issue was resolved by the following.
Login into GoCD UI.
Click on "Agents"
Select the agent which is required to be restarted
click on Disable button
refresh the page.
You will see that agent disabled and at the last in the list
Copy the "Agent Name". This is the host of agent. Login into this host with Cada credentials.
Run command : sudo su -
Now execute : sudo /etc/init.d/go-agent1 restart (Note : The last digit after agent will change as per Agents/"sandbox" value in the GoCD UI)
Above command will restart the agent
Now go back to the GoCD UI, select the disabled agent and click on Enable.
Refresh the page, agent should be back in idle state.Restarting GoCD agents:
I'm getting a Aapt error in all of my Android projects.
When searching for an solution I found using android.enableAapt2=false could help, but i'm constantly getting errors like;
Caused by: java.util.NoSuchElementException
at com.google.common.collect.AbstractIndexedListIterator.next(AbstractIndexedListIterator.java:80)
at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:315)
at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:263)
at com.android.builder.internal.aapt.v1.AaptV1.makePackageProcessBuilder(AaptV1.java:202)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt.makeValidatedPackage(AbstractProcessExecutionAapt.java:67)
at com.android.builder.internal.aapt.AbstractAapt.link(AbstractAapt.java:34)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:807)
... 56 more
I already reinstalled Android Studio, Android SDK and i tried deleting my settings files.
When i'm not using android.enableAapt2=false im getting
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
Caused by: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$compile$0(QueueableAapt2.java:136)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:443)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:395)
at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:312)
at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
I am using Android Studio 3.1.1 build 173.4697961.
edit: I also tried to clean the project, as well as running .gradlew clean, rebuild ect.
edit: I'm using Gradle 4.4 and Android Studio 3.1.1. I cleared the cache and restarted, also I deleted the .gradle/cache folder from my account
I was getting same error, here's steps i followed to resolve it.
-update all files in app.gradle its asking for.
- update all files in build. gradle its asking for.
- invalidate cache and restart Android studio.
Aapt2 is enabled by default when you use android plugin for gradle 3.0.
so open gradle.properties and add android.enableAapt2=false
as shown here https://i.stack.imgur.com/lWyT2.png
I fixed it by reinstalling my PC.
The problem was caused by having ë in my username.
this can happen if you edited String.xml file. reset Strings.xml
I guess by invalidating cache and restarting may fix your problem!
I am trying to build a maven project using eclipse. My overall problem is Maven will not connect to the online Maven repository to collect the necessary artifacts needed to build the project. I have tried using numerous proxies, but get the following errors:
Caused by: java.io.IOException: unexpected end of stream on Connection{repo.maven.apache.org:443, proxy=HTTP # /101.96.11.44:95 hostAddress=101.96.11.44 cipherSuite=none protocol=http/1.1} (recycle count=0)
at com.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:210)
at com.squareup.okhttp.Connection.makeTunnel(Connection.java:400)
at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:229)
at com.squareup.okhttp.Connection.connect(Connection.java:159)
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:175)
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:330)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:319)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at com.squareup.okhttp.Call.getResponse(Call.java:271)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199)
at com.squareup.okhttp.Call.execute(Call.java:79)
at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:154)
at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:100)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:600)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
... 48 more
Caused by: java.io.EOFException: \n not found: size=0 content=...
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:200)
at com.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:190)
... 65 more
I have also tried connecting to another network that is not my own and have had no success.
When I do not use a proxy, I get the following errors:
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:980)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:242)
at com.squareup.okhttp.Connection.connect(Connection.java:159)
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:175)
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:330)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:319)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at com.squareup.okhttp.Call.getResponse(Call.java:271)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199)
at com.squareup.okhttp.Call.execute(Call.java:79)
at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:154)
at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:100)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:600)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
... 48 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:961)
... 67 more
The only solution that I have found is downloading the dependencies one by one from the Maven repository manually. Given that there are more than 100 dependencies left to install, I'd really prefer not to spend that much time getting this to work. If any other details need to be provided, I will be happy to do so.
Under Windows I resolved this problem by using mvn install in a command shell for my project.
Then I added/changed <localRepository> in the settings.xml of eclipse maven user settings to c:/users/ttt/.m2/repository where I found the downloaded dependencies.
I have installed java JRE but i keep on getting. Am using windows 10 for development
After running ionic run android or ionic emulate android i get this error:
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.zip.ZipFile.<init>(ZipFile.java:159)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
I have also set JRE_HOME in the environment variables
Probably it is related to something missing or corrupted.
You can find a similar question here, hope it helps.
First of all you have to install
node.js
apache ANT
JDK & JRE
Android SDK & Eclipse
After installation, you have to set software paths into environmental- variable. Then fire your npm install -g cordova. Without this PhoneGap will not be created.