Android Studio 2.2.1 - Windows 7 Ultimate 32-bit - android-studio

I am new here so I would like to apologise if I do/say anything wrong firstly. I have Googled this issue and searched Stack Overflow for it as well but it was not the exact problem which I am having.
I am currently doing Rob Percivals Android N Developer course on Udemy.com . In the course they recommend that you work in Android Studio 2.2.1 (which they generously provide a download link for).
I installed this on my machine and immediately I encountered a JDK/JRE issue which I solved through a quick Google. Then when it came time for me to create a new project, a whole new problem appeared.
Here is what I am doing (I'm sure if you're reading this you are 100% familar with Anroid Studio and don't need screenshots hence why I didn't provide any):
Create new project
I am choosing "Phone and Tablet Only" with and API 15
I am checking on "Generate new layout file" and "Backwards Compatibilty"
Finish
Now immediately. an error message pops-up "Grade 'xxxxx' project refresh failed. Unable to start the daemon ... object heap"
The solution proposed on Stack Overflow was to go into the "gradle.properties" file and change "-Xmx1536m" to "-Xmx1024m" and then close and open Android Studio. While this works, my question is do I have to do this every time I start a new project? Is there no permanent fix here?
I have read through all other suggestions such as deleting the .gradle folder in my Users folder and File Menu - > Invalidate Caches/ Restart->Invalidate and Restart but none of them works for me.
I would appreciate any responses.

Answer 1 :
Steps to solve problem in android studio
Click on file and select a other setting from dropdown menu and then select default setting.
Select build,Execution,Deployment option.
Select Compiler
Here add a following line in Additional build process VM option
-Xmx3072m -XX:MaxPermSize=524m
Check This Image
Answer 2 :
Try deleting your .gradle from C:\Users\<username> directory and try again

Related

Error when using development time IIS support

Update: this bug has been fixed for a while now
I installed Visual Studio 2017.3 yesterday and was trying to used the new Development time IIS Support feature. I think I encountered a bug, and I was wondering if anyone knows a workaround this bug. When I used it with a new project it works fine most of the time. By most of the time, is that I think it is broken sometimes depending on the where the project is located/state of cached data, etc.
Sometimes I get an error "Value cannot be null. Parameter name: name". That's the entire error. No log files, no extra information.
I tried to enable the feature for an existing project I am working
on, it got that error.
I tried adding a new web project in a new solution it worked fine. I tried adding a new web project in the same solution as my project, it didn't work.
I deleted all temp files, all bin obj and .vs folders and .user files in the
solution. Same problem.
I deleted temp folder, visual studio user profile data, and restarted the PC same problem.
I tried again in the same solution with the project not having '.' in the name, it worked.
I did some modification to the project that was working and tried to launch again I got same error.
I reverted all changes so that the project was back to the "empty project" state, still same error.
I removed the project. Exited visual studio, deleted all temp/.vs/.use/bin/obj files. Then restarted and added the project again, it worked.
I restarted VS and tried to relaunch it didn't work.
The aspnet core version seems to be not related to the bug. I had the problem with projects targeting 1.1 and 2.0 and also had the feature working for both versions.
So obviously this is a bug in VS2017.3. Since even if I am doing something wrong I should at least get an error explaining what I do wrong not an ArgumentNullException message. I already made a bug report. I am wondering if someone knows a workaround thing bug.
Thanks a lot in advance.
Update: This bug has been fixed for a while now.
After some investigation and with help from a helpful member of Microsoft's Visual Studio Team, I found that Visual Studio was failing at the point where it grants folder read access to the IIS App Pool account. The method that gets the App Pool account name was returning null, and when that null value was passed to the System.Security.Principal.NTAccount class constructor, the ArgumentNullException is thrown.
A workaround that fixed the problem for me, was changing the App Pool to any other App Pool, trying to launch, then changing it back to the original/desired App Pool.
First You Must Update Visual studio with visual studio Installer and Launch the Visual Studio installer.
And Select the Development time IIS support component and Modify.
Wait For Download is Processing
The component is listed as optional in the Summary panel for the ASP.NET and web development workload.
Then you Create New Project Again
Problem Solved.

SyncFusion Xamarin.Forms Samples not building for iOS/Droid Projects

I have VS 2015 Community with Xamarin, Android SDK, etc. installed and today I stumbled upon SyncFusions Controls for X.F that are free in the community license. I installed the SyncFusion Essentials Studio for Xamarin.Forms.
The problem is that I cant run the included Samples like SampleBrowser or ServerMonitor when I select Android or iOS. If I select UWP or WinPhone the apps run.
The issue is that the projects do not build. In The SampleBrowser for example I get 1400+ Errors when I want to build. VS recognizes almost nothing of the Code. But as I said everything that is not a Droid/iOS Project runs.
I have the Android SDK installed with API 19-23. AVDs are also configured. I also have a Macbook Air next to me that is connected to VS.
I tried cleaning the solution and re-building the solution without success. There were also no changes to the code made.
Edit: Here is a picture of the error list:
Edit 2: Here is the error list from "build only" on pastebin and as an image:
I found the solution. The comment to only show "build" errors lead to the errorlist you see in Edit2. There you see an OutOfMemory-Error. The resolution is the following.
I copy the solution in case the site will go down. Source: http://www.kiwipiet.com/2016/05/javalangoutofmemoryerror-consider.html
"I was getting a java.lang.OutOfMemoryError while trying to compile a Xamarin Android application after adding HockeyApp.
I found to ways to resolve this.
The first option is to add a Environment Variable called _JAVA_OPTIONS and set it to -Xmx1g. This sets the JVM heap size to 1GB. You can either do this from the commandline by calling
SET _JAVA_OPTIONS = -Xmx1g
Or you can edit your system environment variables:"
The “java.lang.OutOfMemoryError” error is a Xamarin issue and it occurs when the app size is exceeded some limit. You can refer the following bug report.
https://bugzilla.xamarin.com/show_bug.cgi?id=18327
Solution:
Right click the Android project and select Properties > Android Options > Advanced
Set the Java Heap size as 1G.

VS 2012 Error on build of Hello World: "The operation could not be completed. The parameter is incorrect"

I have started up VS 2012. I created a new solution/project, and made the project a console app. In the provided "Program" class, in the "Main" method, I have added a single line, namely:
Console.WriteLine("Hello World");
This is the ONLY thing I have done.
I right-click on the solution name, and select "Build".
Immediately, a dialog/alert pops up with the title "Microsoft Visual Studio", containing the silver "X" in the red circle, followed by the enormously useful error text that reads:
The operation could not be completed. The parameter is incorrect.
I have done extensive searching on this very informative error, and have come to the conclusion that it pops up in many different circumstances. In my case, I started experiencing it some days ago (on a much more complex MVC app) and it seems intermittent. Sometimes I get the error, sometimes not. Sometimes I can close VS entirely and re-open and it will still be there, sometimes it will be gone for several hours. Rebooting the system (ick) usually makes it go away.
Any help out there? This is now driving me crazy. Many thanks in advance.
ADDITIONAL INFO: If I kill all Visual Studio applications in the task manager (rather than just closing the Visual Studio the more conventional way) it seems to always fix the problem on restarting Visual Studio. Still baffled.
Simply turning VS off and on again removed this error for me.
I tried to solve this by deleting the *.suo files, bin and obj folder, with no success. I tried to restart VS(2015) and reload the solution. All project references were fine.
I then killed all processes related to Visual Studio.
After that I was able to rebuild the solution.
For me this happened when I removed a project from the solution that wasn't at the same path anymore.
Weird, it was a greyed out project, but was still needed for the build somehow?!
I found out where it was referenced, in my .sln file I had a References entry pointing to the guid of a missing or deleted project in the solution. This would cause an error.
You can also check the properties pages of the solution, one of them gives a message about a project with the name "" that doesn't exist.
So basically, cleanup the References section in your .sln until it builds.
This happened to me in a new web project in VS 2015. I got the error when I tried to build or clean the solution. Closing down VS and deleting everything in the bin folder worked for me.
For me what helped was to delete all bin obj folders and rebuild the solution.
I was moving an mvc project from 2013 to 2015.
Strange as it is - happened to 2 solutions, but not for every other I had.
For me, my project was not opening on VS 2022 ,i tried this and it worked!
Directory: Your project folder/.vs/SolutionName/.suo
Solution: Delete All .suo files from above directory
Note: If you cant find , just search '.suo' on project folder.
Run the project.

This app failed to launch because of an issue with its license

I'm happily in the middle of coding then I try to launch my app in debug mode but I get this error message.
Unable to activate Windows Store app
This app failed to launch because of an issue with its license
The app was launching fine a few minutes earlier so this came as a surprise. I tried restarting Visual Studio but doing so did not help.
I got the annoying "renew your developer license" dialog yesterday I think. It had renewed without issue.
How do I make this error message go away so i can debug my app?
Well, I got it working by deleting the main project's 'bin' and 'obj' folders. Cleaning and Rebuilding wasn't enough. Hope this answer saves someone else the few minutes of confusion I just experienced.
I recently had a similar issue. In my case I had to uninstall the re-install the app to get it working.
Hope this helps someone. Also, to find out further detail about why it failed, you can checkout the event logs:
Event Viewer > Applications and Services logs > Microsoft > Windows > Aps > Microsoft-Windows-TWinUI/Operational
There might be some more detail in there. In my case it was logged as an error event which said the app could not be launched because of a temporary issue with its license.
I just uninstalled the existing version of the app from the start screen, and then launched the app again from Visual Studio and it is launched just fine.
I think the reason behind this is because of renewing the license of Visual Studio and trying to launch an app that was installed when the previous license was active.
I see doing stuff with the bin and obj folders appears to be the accepted answer to this.
I fixed this issue by selecting the 'Uninstall and then re-install my package. All information about the application state is deleted.' check box under the Debug tab of the project properties. You can uncheck it once you've done it once for all future builds.
I haven't had any issue with this solution. Simple fix and you don't have to worry about someone doing something to folders that could cause bigger issues.
http://daxdude.blogspot.com/2013/04/c-error-unable-to-activate-windows.html
I've had this issue a few times now, most of the time deleting the Bin and Obj folders will clear the issue up (These folders are automatically generated during a project build so don't worry about deleting them)
I have found whilst debugging on a remote device (A tablet or phone) that Deleting these folders doesn't solve the problem though - in this case the best solution I have found is just to do a restart on the device I was remote debugging to.
Simple but it works!
I just cleaned my solution and re-started Visual Studio. That did the trick for me - and didn't involve hunting around for files to delete, so you might want to try that first.
go to BUILD-->Clean Solution and click and after its has been cleaned again go to BUILD-->Rebuild Solution. After it has successfully rebuilt your solution just deploy it(Ctrl+F5). This solved the problem for me.

The Debugger cannot continue running the process. Unable to start debugger

I have a Lightswitch 2012 application. It's been working fine for weeks. I made some changes and F5 stopped working. When I click on Start (toolbar) it gives this error message and does nothing.
"The Debugger cannot continue running the process. Unable to start debugging"
Note: It does compile file, it just doesn't run.
If I rollback to an earlier version then it works fine - i.e. it is solution specific.
Here is a video of the current version of my solution with the problem:
http://screencast.com/t/TD4RzLASO
and here is the previous version of the solution from earlier today (and no, I don't know what I changed). As you can see, at least it does something with F5 or Start:
http://screencast.com/t/wX5fRDPz
Rebooting doesn't help... ;)
Maybe you should select start up project which can be started.
Solution Explorer -> On your startable project right mouse click -> Set as Start up Project.
I had this situation when i unloaded my main lightswitch project and other project which is dll has been selected automatically and when i reloaded my main project "The Debugger cannot continue running the process. Unable to start debugging" exception was shown, because debuger was trying to load DLL.
Sometimes you need to start up a project which is compiled as a dll, for instance when testing WCF services.
To do so:
Projects -> 'Set Startup Projects...' -> Select 'Multiple Startup Projects' and set action to 'Start' for each one.
It's a pity you didn't recorded the whole screen, so I can't confirm, but I had the same error a few times...
When this happens, my "output panel" isn't visible and even I try to go on Menu -> View -> Output the panel don't appear.
I need to restart my Visual Studio 2013.
Then my output panel is visible again and everything works fine.
I discovered the cause was an extension which I installed on my Visual Studio.
I encountered this problem after removing some projects from the solution. I wasn't able to pinpoint the exact cause, but closing the solution, deleting the solution file, then opening the project and re-adding supporting projects solved the issue for me. Kind of a sledge hammer, but only takes a minute to do if you don't have a lot of projects.
Also, there are some people that uses a "One Click" Certification in your settings that you'll want to make sure its set up right, re-install or unchecked in-which this case was my problem. I finally got it working myself, but check that too just in case. Again this would be for most Visual Studio Versions only. Im 2013 Ult.

Resources