restore my project in android studio from phone app - android-studio

My notebook died and I lost all my data and my Android Studio projects. Only what I have left is apps in my phone. Is it somehow possible to restore it in Android Studio from my phone app? Thank you.

Option 1: somehow get the original files back. You could try to:
See if the drive still works by putting it into another system
Search for some kind of backup (backup utility/cloud storage/github)
Get some professional to rescue your data (if everything fails)
Option 2: decompiling
I just tried decompiling one of my apps here and it kind of worked. You may have to remember your project structure somehow, but in the end, I think it's doable for smaller app projects.
Disclaimer: never decompile other people's software without their permission.

Related

Is it possible to include Linux library in android studio project build on windows?

The idea is that I want to use non-java library compiled for android on Linux, cuz the only toolchain I managed to get working is Linux rather then windows. I don't want to put android studio onto my virtual machine cuz it will be slow or dead, and probably unnecessary. I'm curious what would be the problems if I make a library file on my virtual machine, spit it out into shared folder and then add to my android studio project on windows? Will there be any problems at all? I'm not sure if android studio executes the files before packing them to APK, or if there any filesystem related issues. Can someone elaborate on that, and if anyone knows of a better way to do that - please mention it.
Also to clarify - I don't need to run it on emulator - it will go straight to my device.
Thanks in advance :)

What links do we need enabled for Android Studio?

I'm working at a corporate location where we have restricted access to network. The hurdle that I'm facing is that I'm supposed to do some research on Android development and the network is not what I wanted it to be. I have installed Android Studio and created a new project. But as soon as the project is loaded, gradle sync operation starts and fails after not finding JUnit & similar dependencies.
I have already added the proxy settings in Android Studio and SDK manager, but I believe I'll have to request for unblocking some of the URLs that Android Studio needs access to. I couldn't find any such list, can someone please help me with the same?
I have tried running Fiddler to see which requests are being blocked, but I see only 1 URL and that is clients1.google.com but I'm not sure that is the only thing needed.
After lots of hits and misses, I have found the answer to this question. The build.gradle file for the project has the answer to this. It calls a function jcenter() which internally calls the libraries available at http://jcenter.bintray.com/. So, the entire list for Android Studio development including the SDK would be:
http://dl.google.com:443
http://dl-ssl.google.com:443
https://dl-ssl.google.com/android/repository/*
https://developer.android.com (for Android Studio downloads and documentations)
http://jcenter.bintray.com/
Thanks for all the help provided.

Android Studio projects taking up too much space

my android studio project is taking up too much space . I only have 100 gig hard drive. is there any way i can clear up some space?
Well.. you can upgrade and add another hard drive or delete some not-used projects. Or you can delete old SDK that you don't really use.
Look.. there is a lot of ways to empty your disk and you can find most of them on the internet but this place is just not right for this kind question.
http://www.howtogeek.com/125923/7-ways-to-free-up-hard-disk-space-on-windows/
Delete All files inside directory ~YourApplication\app\build... Whenever you open this project in Android studio, it will regenerate these files again. It will reduce your project space when your are not using it.
I think you were looking for (in project in Andriod Studio)
Build > Clean Project
Found here

Visual Studio regularly freezes running Microsoft.VisualStudio.Web.Host.exe

Background
I maintain several web sites that are Visual Studio "Web Site Projects".
Problem
I've found that with a couple of these projects, Visual Studio regularly freezes while I'm working on the code. This doesn't happen for some of the web site projects, and I haven't seen it happen on any Web Application projects.
Symptoms
Each time it freezes, it takes about half a minute before I can use it again.
During a freeze, Windows Task Manager reports that Microsoft.VisualStudio.Web.Host.exe is maxing out one of the CPU cores.
Steps to Reproduce
Open a .cs file under the App_Code directory.
Make a change to the file.
Save the file.
Navigate somewhere else (eg switch tab, close the file, open different program in Windows).
Navigate back to the file (eg switch tab to it, open it, or go back to Visual Studio).
Other actions that sometimes seem to trigger the problem:
"Go to definition"
Opening a file
Previewing a file
Closing a file
Using a refactoring
"Find usages"
What I've Tried
Both Visual Studio 2012 and Visual Studio 2015
Changing the website project's build action
Disabling "Build Web site as part of solution"
Deleting web references and the Bin folder seems to minimise the problem, but obviously this breaks the web site. Maybe web site projects experience this problem when they contain a lot of C# code other than code-behind files?
Similar problems
I found the following potentially-related problems using Google, but none of them seemed to contain a workaround or solution.
Microsoft.VisualStudio.Web.Host.exe Time Theft
Microsoft.VisualStudio.Web.Host.exe
Visual Studio 2012 freezes for approximately 30 seconds after every build
I noticed that the problem happened less often when I suspended ReSharper.
The problem still happened occasionally when editing classes under App_Code, but restarting Visual Studio worked around it.
I was facing a similar problem. A single Web application project with dozens of class libraries, migrated over from VS 2010 into VS 2013.
I was able to solve my problem by disabling the "Hosting Process" option:
To disable the hosting process
Open an executable project in Visual Studio. Projects that do not
produce executables (for example, class library or service projects)
do not have this option.
On the Project menu, click Properties.
Click the Debug tab.
Clear the Enable the Visual Studio hosting process check box.
Full details on MSDN: http://msdn.microsoft.com/en-us/library/ms185330.aspx
Another option for people experiencing this on old web applications that don't have the properties page in the accepted answer above.
Disable "Allow this precompiled site to be updatable".
Open Site/Solution
Right click and view Property Pages
Go to MSBuild Options
Uncheck "Allow this precompiled site to be updatable"
This worked for me.
This problem stopped happening when the Web Site project was converted into a Web Application project.
Not an easy solution, but it did stop the problem.
They symptoms in the question of this post sound exactly like the nightmares I just had today:
Other actions that sometimes seem to trigger the problem:
"Go to definition"
Opening a file
Previewing a file
Closing a file
Using a refactoring "Find usages"
Plus intellisense wasn't working (even with CTRL + J) and
'Peek definition' was hanging as well.
I had to keep task killing visual studio (both 2015 and 2017).
My fix was to go into the project that I was having problems with, open the 'Package Manager Console' and uninstall and re-install the 'DotNetCompilerPlatform'
uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
and then
install-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
So far every problem I was encountering has not resurfaced (but this was just today so still need to give it time).
UPDATE:
It started creeping back again. I noticed also that whomever had installed to the solution had only done it to two of the various projects. Uninstalling the compiler platform (which means using the compilers that came with Visual Studio) has made life sane again.

Publishing projects without VS Publish

Our team has been having quite a lot of trouble with Visual Studio's publish feature. We use TFS and are all running VS 2012 ultimate. It works fine when only one person is involved in a project, but when we get many people inside one project, the publish profiles get off and Visual Studio reports a successful publish even when all files haven't been copied up. I've read all the SO questions about why this happens and I understand that TFS adds the publish profiles to the source control automatically. If we create a new publish profile and republish, everything works. But this is not sustainable. I can't prevent VS from automatically adding the publish profiles to TFS (if we could, I think this would solve the problem) so I'm now looking for better ways to publish an application to a web server. Is there a better tool out there to publish web applications or do I need to write my own VS extension?
Per this question (https://stackoverflow.com/a/12393154)
The temporary answer seems to be to change your settings from release to debug, save, then switch it back. This causes the pubxml.user file to be rebuilt, which is actually the problem.

Resources