Error installing cold swap patches: java.net.SocketException: Broken pipe
Error while Installing restart patches
I have tried everything I can, but no luck.
(Error while Installing restart patches when launching android app with Android Studio 2.0)
anyone can help me out?
gradle: 3.2.1
android studio: 2.2.3
Log:
2017-01-06 20:56:00,710 [9781722] WARN - #InstantRun - Failed to push dex files:
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.DataOutputStream.write(DataOutputStream.java:107)
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
at com.android.tools.fd.client.ApplicationPatchUtil.write(ApplicationPatchUtil.java:53)
at com.android.tools.fd.client.ApplicationPatchUtil.write(ApplicationPatchUtil.java:42)
at com.android.tools.fd.client.InstantRunClient$4.communicate(InstantRunClient.java:399)
at com.android.tools.fd.client.InstantRunClient$4.communicate(InstantRunClient.java:393)
at com.android.tools.fd.client.InstantRunClient.talkToAppWithinPortForward(InstantRunClient.java:233)
at com.android.tools.fd.client.InstantRunClient.talkToApp(InstantRunClient.java:202)
at com.android.tools.fd.client.InstantRunClient.pushPatches(InstantRunClient.java:393)
at com.android.tools.fd.client.InstantRunClient.pushPatches(InstantRunClient.java:349)
at com.android.tools.idea.fd.InstantRunManager.pushArtifacts(InstantRunManager.java:187)
at com.android.tools.idea.run.tasks.DexDeployTask.perform(DexDeployTask.java:56)
at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Please do following steps
I think the problem is due to instant run feature of Android Studio 2.0.and above This might help
1.Open the Settings or Preferences dialog.
2.Navigate to Build, Execution, Deployment > Instant Run.
Uncheck the box next to Restart activity on code changes
Related
I updated from Android Studio 3.1.4 to 3.2. Now sync fails with the error message
Sync finish event has not been received
How can this be fixed? Invalidate Caches/Restart did not help.
The ida log shows the following warning:
java.lang.NoClassDefFoundError: org/gradle/wrapper/WrapperConfiguration
at org.jetbrains.plugins.gradle.util.GradleUtil.getWrapperConfiguration(GradleUtil.java:92)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:208)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.doGetGradleHome(GradleInstallationManager.java:194)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:129)
at org.jetbrains.plugins.gradle.GradleManager.lambda$getExecutionSettingsProvider$2(GradleManager.java:150)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:732)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:201)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:177)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:132)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:269)
at com.sun.proxy.$Proxy148.getResolver(Unknown Source)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:84)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:163)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:550)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:647)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.WrapperConfiguration PluginClassLoader[org.jetbrains.plugins.gradle, 181.5540.7.32.5014246] com.intellij.ide.plugins.cl.PluginClassLoader#5f6fe2bb
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
The only solution I found was to remove Android Studio and reinstall Android Studio 3.2 from scratch.
EDIT
The problem might be different from OP but this is also a new issue in AS 3.2 which gives you Gradle sync error
I had Gradle sync error for the last couple of days after I updated to AS 3.2 and in my case, the problem was one of my library modules contain the following in Manifest.xml
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="27" />
and the solution was to remove 'uses-sdk' (in AndroidManifest.xml file) in ALL the modules in your project.
Try to look into the log of the IDE, for my case it was a flutter plugin causing the issue..
You can navigate to the logs by clicking on show log in the gradle try again strip at the top.
or
go to
~/username/Library/Logs/AndroidStudio3.5/
and read the idea.log file.
java.lang.NoClassDefFoundError:
org/gradle/wrapper/WrapperConfiguration
It seems like WrapperConfiguration class couldn't be found. Try these commands:
brew install gradle
gradle wrapper
The second line will install wrapper class. And then,
gradlew clean
After updating to Android Studio from 3.0.1 to 3.1, and updating all plugins and SDK tools i am no longer able to debug my native application.
The error is 'Execution finished' (ExecutionFinishedException) which is raised in LLDB.
LLDB version is 3.1.4508709 (which is the latest).
If i try and debug with an earlier version of LLDB i get an error LLDB is missing (or similar).
Error details:
Execution finished
com.intellij.execution.ExecutionException: Execution finished
at com.jetbrains.cidr.execution.ExecutionResult.get(ExecutionResult.java:38)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.getProtobufClient(LLDBDriver.java:90)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.executeConsoleCommand(LLDBDriver.java:1109)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.executeConsoleCommand(LLDBDriver.java:1103)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadStartupScripts(AndroidLLDBDriver.java:321)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.commonLoad(AndroidLLDBDriver.java:132)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadForAttach(AndroidLLDBDriver.java:248)
at com.android.tools.ndk.run.AndroidNativeAppDebugProcess.prepareTarget(AndroidNativeAppDebugProcess.java:101)
at com.android.tools.ndk.run.AndroidNativeDebugProcessImpl.doLoadTarget(AndroidNativeDebugProcessImpl.java:123)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess.lambda$start$0(CidrDebugProcess.java:314)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:703)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:693)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$0(QueueProcessor.java:93)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:93)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$3(QueueProcessor.java:226)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$4(QueueProcessor.java:226)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.intellij.execution.ExecutionFinishedException: Execution finished
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$4.processTerminated(LLDBDriver.java:248)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:239)
at com.sun.proxy.$Proxy16.processTerminated(Unknown Source)
at com.intellij.execution.process.ProcessHandler$4.run(ProcessHandler.java:196)
at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:272)
at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:177)
at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:173)
at com.intellij.execution.process.BaseOSProcessHandler.onOSProcessTerminated(BaseOSProcessHandler.java:192)
at com.intellij.execution.process.OSProcessHandler.onOSProcessTerminated(OSProcessHandler.java:89)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:155)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:140)
at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:66)
... 5 more
Last 2 lines from gdb-server log:
1522263876.330623627 NativeProcessLinux.cpp:MonitorCallback got exit signal(0x002EA90B) , tid = 25279 (is not main thread)
1522263876.330640793 NativeProcessLinux.cpp:MonitorCallback tid = 25279 handling non-main thread exit (%s)
Anyone else experienced this or know of a fix?
A workaround is to re-install Android Studio 3.0.1. This can be done alongside the latest version (see https://developer.android.com/studio/preview/install-preview.html).
For me, debugging c++ code then works again (in Android Studio 3.0.1) even though it is using the same versions of SDK tools (e.g. LLDB v3.1.4508709).
I've written a custom lint detector based off this example repo. I'm trying to debug the detector using the tests provided however when I try to run these tests through Android Studio all I get is an error in the bottom right
Empty throwable: Unable to determine gradle tasks to execute
Full error:
Unable to determine gradle tasks to execute
com.intellij.openapi.diagnostic.Logger$EmptyThrowable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:129)
at com.android.tools.idea.gradle.run.DefaultGradleBuilder.build(DefaultGradleBuilder.java:40)
at com.android.tools.idea.gradle.run.MakeBeforeRunTaskProvider.executeTask(MakeBeforeRunTaskProvider.java:258)
at com.android.tools.idea.gradle.run.MakeBeforeRunTaskProvider.executeTask(MakeBeforeRunTaskProvider.java:86)
at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:317)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I'm unsure what the issue is as I believe I should be able to debug the detectors like this (see this source)
I wanted to create a new porject in Android Studio 2.0, so I choosed a name and location for my new project, then I have clicked on the Next button.
after that, in Target Android Devices window, I've choosed a minumum SDK, then clicked on Next button again, but the new project proccess will stuck on a window which is saying Installing Requeted Components and below code is error that shows in Evenet Log : NullPointerException: null
null
java.lang.NullPointerException
at com.android.repository.util.InstallerUtil.resolveCompleteArchiveUrl(InstallerUtil.java:194)
at com.android.repository.impl.installer.BasicInstaller.install(BasicInstaller.java:76)
at com.android.tools.idea.sdk.wizard.legacy.SmwOldApiDirectInstall$InstallTask.run(SmwOldApiDirectInstall.java:203)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
How can i pass this error and create a new project now?
*Note: my SDK is full and I have every platform in it
It is not stuck, it will take some time normally 5-7 mins , it also depends upon internet connection, so wait for some time. It will take time only for first launch.
Update: Check the latest log file in
C:\Users\.gradle\daemon\x.y
folder to see what it's downloading.Here is the answer
I have resolve this by installing bundle version.
Recently, when I try to analyze code in Android Studio (Analyze > Inspect Code) I always obtain this error:
11:35:28 IllegalArgumentException: Argument for #NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null
In other projects it works fine. When IllegalArgumentException link is clicked, this screen is shown:
Obviously, I don't want to disable plugin.
Exception text copied here:
Argument for #NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null
java.lang.IllegalArgumentException: Argument for #NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null
at org.intellij.sonar.persistence.SonarServers.get(SonarServers.java)
at org.intellij.sonar.analysis.DownloadIssuesTask.from(DownloadIssuesTask.java:53)
at org.intellij.sonar.analysis.SonarQubeInspectionContext.performPreRunActivities(SonarQubeInspectionContext.java:143)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase.initializeTools(GlobalInspectionContextBase.java:340)
at com.intellij.codeInspection.ex.GlobalInspectionContextImpl.runTools(GlobalInspectionContextImpl.java:339)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase$6.run(GlobalInspectionContextBase.java:283)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase.performInspectionsWithProgress(GlobalInspectionContextBase.java:280)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase$4.run(GlobalInspectionContextBase.java:241)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
Anyone has experienced this issue? Where is the problem and what can I do to resolve it?
You should configure a SonarQube server to use as per the README from the plugin repository:
After the installation, you first of all need to configure the
connection to your Sonar server. This is done per project and/ or
module. You can use a remote server or a local one on your machine.
In your IDE go to Preferences -> SonarQube.
Click Add, enter the address of your Sonar server and the credentials (if needed) and click OK.
This error can also be thrown when you created the server in the project settings but not in the global settings. You have to select & add the server in the global settings as well.