tag:blogger.com,1999:blog-3127674233905917979.post6480299489868104916..comments2022-11-19T11:29:18.624-08:00Comments on V. Sim's apps: Feedback page for my basic Android Web app development projectV. Sim.http://www.blogger.com/profile/08635317776691782594noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3127674233905917979.post-80487227408997174762019-01-24T03:28:33.002-08:002019-01-24T03:28:33.002-08:00Thanks for writing a clear and (even better) worki...Thanks for writing a clear and (even better) working example for this simple app - it's exactly what I was looking for - you're a star!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3127674233905917979.post-74756411567002347882017-01-16T20:45:34.208-08:002017-01-16T20:45:34.208-08:00Studio hangs after creating a new project
I'l...<b>Studio hangs after creating a new project</b><br /><br />I'll make the start, with the problem that I've encountered most often, as said on my Web app project page.<br /><br />After opening a Studio project, Gradle sync and afterwards Gradle build are executed automatically. If it's a new project, that is these processes are done for the first time on the given project, they last a lot longer. Quite often in my experience it happens that Studio hangs at this point. It seems to have stopped working in the background for some time, like 10 minutes, but it shows that it's still working (but the status bar indication doesn't change).<br /><br />First you try the usual tricks, close the project and open it again, close Studio (from Task manager if necessary) and reopen it, restart your system. Also, Clean project (from the Build menu) often fixes such situations.<br />If these don't work (after repeating them a few times):<br /><br />I've found 3 things to do, so far they've helped solve any of the 2 such situations I've had.<br /><br />First, if you're short of RAM (less than 2G), otherwise you can skip this.<br />Open gradle.properties, which you find in the project structure pane, directly under the app name. You will find a line that says something like<br /><br /> org.gradle.jvmargs=-Xmx1536m<br /><br />I'm not sure the value after Xmx will always be the same. Anyway, change it to something like Xmx500m .<br /><br />Second, make sure you have at least 5G free on the system volume.<br /><br />3rd, if it still hangs, look in the Gradle console in the lower right corner of the project window. If you find exceptions that look like<br /><br />Exception in thread "png-cruncher_4" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\android\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds<br /><br />then try what Studio suggests, 1. check your anti-viruses and 2. set environment variable SLAVE_AAPT_TIMEOUT to a bigger value, like 30 instead of 5 (seconds).<br /><br />As said, these worked for me. If you try them and still no luck, take a look at this thread:<br /><br />https://code.google.com/p/android/issues/detail?id=188627<br /><br />One can see many people having the same problem and trying various fixes, some work for some, others don't but usually everybody solves it some way. So there's hope for you too.V. Sim.https://www.blogger.com/profile/08635317776691782594noreply@blogger.com