Android studio can't run when connected to internet - android-studio

When I run on anything it just says:
Executing tasks: [:app:assembleDebug]
But once I disconnect from the internet it starts working. Otherwise it just keeps saying it forever. I already waited like 15m
I already ticked offline in Settings > Gradle and also used the deamon and parallel in gradle.properties. its actually pretty fast when im not connected to the internet.
and my net is incredibly awful, could it be that? if yes is there anything i can do myself (download something myself) so it can work offline?
and also my problem is diffrent than the others, for others it takes long which gets fixed by gradle.properties but mine is about the internet connection!
and also Im running Windows 8 x64!

Related

Too many open files error in Visual Studio Node.js under parallels after upgrade to MacOS Catalina 10.15.7

I just upgraded my Mac to 10.15.7 today. I run Parallels Desktop on the Mac so I can run my Node.js Visual Studio projects. Upon doing this upgrade I can no longer get my project to run. Unfortunately I made a few changes to the code before trying to run but I do not think that is the source of the issue or the log files would be telling me something else. When I run I get hundred/thousands of lines with the "too many open files" error. Below is a sample of one of those lines:
SourceMaps: could not preload for generated script: c:\Users\chris\github\CollegeTennisRanks\CollegeTennisRanks\obj\Release\Package\PackageTmp\node_modules\core-js\library\fn\string\bold.js. Error: Error: EMFILE: too many open files, open 'c:\Users\chris\github\CollegeTennisRanks\CollegeTennisRanks\obj\Release\Package\PackageTmp\node_modules\core-js\library\fn\string\bold.js'
I tried a suggestion I found online to change the settings by going to e terminal window and running the following command:
sudo launchctl limit maxfiles 65536 200000
but that did not change anything, still the same errors when i run the project. The odd thin is that I actually have two projects in the solution and the 2nd one actually runs, but it is a much smaller project and only a console app that dows not start up a web server, etc.
I am assuming that the upgrade to 10.15.7 had something to do with this but no cluee where to go now. Any help would be greatly appreciated.
Well I'll be darned... it was a code change. I copied the project over to a PC and ran and got the same result. Went through last changes one by one undoing them and found that one of my controllers had an issue that for some reason prevented it from running. How to determine that from the log is another question but at least that answers that. Evidently all the "too many open files" messages in debug log are not an issue, which also seems odd.

Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'

I am running Android Studio on Windows 10 64 bit. I upgraded to the latest build and SDK the morning of 5/20, and since then I get the above error when opening Android Studio. I also get the 'Unable to obtain result of 'adb version' in the event log. If I launch the application (which worked fine before the update) the 'Select Deployment Target' window appears, showing 'Initializing ADB' with a loading graphic for a few seconds, which then results in a 'Nothing to show' message. Previously I had 4 different emulators set up, and an active device connect via USB. Now ... nothing.
Creating a new emulator has no effect - I go through the steps and still see the 'Nothing to show' message.
I have tried the following:
Reverting to older platform tools
Removing and re-installing the latest platform tools
Removing and re-installing Android Studio completely
Installed Genymotion to try emulate through that (I can create and start the emulator in Genymotion, it makes no different to the above issue in AS)
killed adb.exe through Task Manager, then ran adb tcpip 5555 through the terminal, the output was:
daemon not running. starting it now on port 5037 *
daemon started successfully *
restarting in TCP mode port: 5555
Which was encouraging, but the same issue described above persists (even after a restart of AS).
Switch to USB mode and back to TCPIP through adb in the terminal, no luck.
Migrated the entire project to Eclipse until I ran into support issues with Google Play Services (so I'm going to have to stick to AS, but I am getting desperate here)
Anyone that can assist - I would greatly appreciate it.
UPDATE - 5/23
I did a search for adb.log and found it in a temp folder on a completely different drive to the one that contains AS or my project files. Closed everything down, killed adb.exe through the task manager and deleted the file. Upon relaunching AS I received the following message:
screenshot of message
I could start/kill ADB through the terminal. adb devices resulted in an empty list. My idea.log file is filled with entries as from the date my trouble started. Restarting AS again resulted in the usual 'Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'' message.
Here is the last entry in my idea.log file:
2016-05-23 10:13:19,081 [ 824808] INFO - tools.idea.ddms.adb.AdbService - Initializing adb using: E:\Users\JakeSabre\AppData\Local\Android\sdk\platform-tools\adb.exe, client support = false
2016-05-23 10:13:24,082 [ 829809] WARN - #com.android.ddmlib - Unable to obtain result of 'adb version'
2016-05-23 10:13:24,083 [ 829810] INFO - ditor.DeployTargetPickerDialog - Unable to obtain debug bridge
java.lang.RuntimeException: Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'
at com.android.tools.idea.ddms.adb.AdbService$1.run(AdbService.java:236)
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:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
The really weird part is that I actually managed to get something working yesterday - but I don't know how. I started AS and received the same error, but then started Eclipse (Mars 2) and launched the Android Device Manager through Eclipse. As soon as I did I could launch my app through the AS emulator! I closed it all down and tried again, just to be sure and it worked again.
This morning I tried the same trick, but was told my SDK is missing. I checked and platform-tools was indeed missing (not sure why). So I installed it again, got the usual error, and now my trick with Eclipse is no longer working. I feel like I am in the Twilight Zone here.
The solution is very simple. Open 'Command Prompt' as 'Administrator', run adb kill-server, then adb start-server. It worked for me.
I probably should have done this as part of my initial troubleshooting, but I ended up disabling Windows Firewall and my anti-virus (Trend Micro). The firewall did nothing, but disabling Trend Micro completely solved the issue....
Somehow, for some reason, Trend Micro decided to start not liking the daemon being created by ADB. 4 days of tears and frustration over such a small thing. Hopefully this helps someone else one day avoid it.
Geez, I can't it's the TrendMicro antivirus !! ... many Thanks !
This also works for me on my 64bit Win 10, took me a day to reinstall AS and ADK and trying to figure out why ... adb kill-server, then try disable/enable Antivirus and you'll see the difference.
For finer-grain of control, add the bin\studio64.exe of AS into the Exception List of Trendmicro Antivirus and it'll bring up adb just fine.
I got this fix by following this link:
https://stackoverflow.com/a/38447003/5521389
going into GenyMotion settings -> ADB tab,
instead of Use Genymotion Android tools (default), I chose Use custom Android SDK Tools and then browsed to my installed SDK.
From the information you've provided, I'm not sure that what I'm about to type applies to your situation. But since no one else has answered, you might want to consider it.
I had a very strange situation in which I kept getting the 'Nothing to show' message even though I had defined multiple emulated types of Android equipment, and also had a physical Android device.
I tried all sorts of things to solve the problem without success. Then I eventually tracked down an adb.log file that had been created in a directory outside any of the usual directory trees managed by the Android tools; a directory that is usually used for temporary storage. The access permissions on the file had somehow been changed so that one of the programs involved in debugging, could no longer access the file, and so failed to start properly. Removing the file solved the problem. The next time I attempted to begin debugging, everything worked as it should.
Although I was working with Linux, if the Android tools work in a similar manner with Microsoft Windows, the file might be in a directory tree identified by an environment variable, either TMP or TEMP.
Just update your platform tools from the SDK manager and restart your editor
In the Task Manager, delete adb.exe
In terminal, run command adb start-server

My app runs very slow after using debugging tools

I was trying to debug a heap corruption issue in our app, and used appverifier, gflags and _CrtSetDbgFlag to try and track it down. now i've cleared the gflags, removed our app from app verifier and removed _CrtSetDbgFlag, yet on my computer now the app is horrendously slow (over 15 minutes just to start it up).
It doesn't matter how i run the app, even with visual studio closed and double clicking a release executable i get the same slow behavior.
Can anyone point me to what i may have screwed up on my machine to have this issue?
Thanks
I've solved the problem for myself by using system restore to go back to before i used gflags. I notice now that gflags does come with the warning:
Note Incorrect use of this tool can degrade system performance or prevent Windows from starting, requiring you to reinstall Windows.
So i probably should have been more careful.
If anyone has a better way to fix this than system restore, like a list of the registry entries that gflags changes and what they should be by default, that would still be very helpful.

"A remote operation is taking longer than expected" x64

First off, I think I've been to every website and forum there is that's discussing this issue and I've tried many different things. I'm at my wits end. This is the dumbest thing and I just want to start coding again!
I'm using Visual Studio Express 2012 for Windows Desktop. I have a x64 project I'm trying to run in Debug mode using the local windows debugger. The only external library I'm using is that of which is required to run DX11.
I attempt to run my program and it freezes. A window pops up saying "A remote operation is taking longer than expected."
I click Terminate and another window pops up asking if I'd like to terminate the remote session. Why yes, I would.
Then it says, "Unable to start program (my path leading to my .exe). The network connection to the Visual Studio Remote Debugger has been closed."
To my understanding, because Visual Studio itself is a 32 bit application, it needs to use the Remote Debugger to compile to x64. Is that correct?
Regardless, I'm still failing to see where that would break down. I've ran several repairs on VS and upgraded to Service Pack 2 (or 1, whichever is the latest).
I've ran a windows repair and uninstalled any VMWare type stuff on my computer. I'm not using a VPN.
I've even copied msvsmon.exe from my laptop (working instance of the project) over to this computer and still no luck.
I'm about ready to Nuke my OS and do a clean install on everything. sigh
Found the problem. It wasn't Windows Firewall like other threads describe. It was my internet filter. I guess it decided to try and block msvsmon.exe because it was using the network. Adding it, along with WDExpress.exe to the application exceptions list did the trick.

My MonoTouch App won't run on 6.1.3, runs on 6.0.x and before... WTF?

I just pushed my app to the App Store after building release/AppStore build using xamarin's Studio...
Everything was green lighted and ready to go, I only had one person who had not installed the release version.... They installed it and it takes 17 seconds to try to start and is killed (I presume). it does NOT create a crash log on the device.
In the Settings there is a "Debug Settings" section under the app - that I didn't put there, including an option for Xamarin Studio Host which is set to automatic but appears to be able to be set to some other string.. (Another message on what the heck this is, and how come it shows up in the first place, and how to get rid of it)
I'm at a loss how to debug this. I just downloaded and upgraded XCode to the latest, in hopes that will help.. (Although, I'm not using the XCode interface to build, but I expect that under the hood it is using that for parts of this, maybe the libraries or something.) Still, unless the iOS writers are nuts, it should be backward compatible with apps written for iOS 4.0 and later... (Mine is a 4.0 targeted app)
Also, on her phone (which has always been 6.x for all the testing she has done), my app has always taken a LONG time to start up.. but on 5.1 it is very fast.. (I.E. 1-2 seconds vs 10+ seconds on her phone)
Anyone got a clue, I sure could use one right now.. I expect that I'll have to reject the binary, and submit another one...
-Chert
Figured it out.... The issue was with the TestFlightApp SDK...
I removed it and now the app starts up OK... Resubmitted to App Store for approval.

Resources