Getting an App APK - android

Hey guys and girls for a the past week I've grown a lot of interest in android studio (even without knowing quite much about it) I decided to create an app that I deemed quite useful. However the app required maps to be integrated in it and I really did not know what I was doing and at one point I started messing with the settings and then all hell broke loose and I kept getting AAPT2 errors and I even tried to fix this issue with the gradle properties line that you add (I forgot the line of code to add). Anyways it still didnt work. However I rembered that I always kept the good version (before I broke everything) of the app on my phone. So when I go in my phone the app is there and it works just fine. Ive tried so many things to get the source code from the app on my phone without any succes. My question is, how can I get the source code back from the working app onto my laptop to continue coding in android studio? If it helps I am using Linux 18.04 LTS and running the newest version of android studio. Thank you for any help from you guys. This means a lot to me.

You can’t get back the ‘source code’ from an already compiled app.
You should consider using some version control platforms like git from the next time

Related

Xamarin Forms Android This type of collectionView does not support changes to its sourceCollection from a thread different from the dispatcher thread

Here is the error I'm getting when trying to archive my app for deployment.
This error doesn't show up at any other time. The project builds and runs on emulators and devices without issue. This error has zero context or direction as to where to look to fix it. It also just randomly showed up out of nowhere, last time I built/archived (with zero functional changes) this error did not happen.
Main difference between this archival and the previous one is a newer version of VS 2017. Don't remember exactly the version from before, but am currently on 15.9.4 (stable).
Looking around on the interwebs, I've found that this error seems to have something to do with ObservableCollection's, which there are probably 10-ish in my app. Not really sure what to do here, because this has never been an issue previously, and I'm coming up on a deadline and with the structure of the app, am not in a good position to start making functional changes.
EDIT
I have also cleaned and rebuilt my solution, as well as deleting all bin/obj folders in my xamarin projects. Even tried deleting the .vs folder which can sometimes help. But still no go.
Going to try updating VS to 15.9.5 and see if maybe it was fixed in a release.
EDIT 2
Updating VS 2017 to 15.9.5 made no difference.
EDIT 3
I had my coworker try archiving the exact same project on his machine (running VS 2017: 5.9.3, and it archived fine for him. So far that's the only difference we've been able to find between our environments.
I saw the same problem using VS2017 15.9.9. Even the same code that could be archived a week ago threw the above mentioned error. It seems related to local data in the solution. A "clear" build was not sufficient. However manual deletion of the local obj and bin folders followed by archiving (build is done implicitly) solved the problem for me.
For my part closing Visual studio and deleting the .vs hidden folder did it.
It's actually a fix for many issues using Xamarin.
I had this other issue where I couldn't archive because the build process would just hang and never end. Deleting the .vs folder did it too.
https://github.com/xamarin/xamarin-android/issues/1760
Just go to project property then go to Android options-> Select Advanced then increase the Java Max heap size to 2G/3G -> it's working for me.
Leon Lu's suggestion worked. I don't particularly like it, as it took forever and repairing basically restores you to a base install (no extensions or personalizations). Took about 1.2 hours to complete, but once done I was able to again archive my android application. I guess something went wrong in vs at some point, perhaps during an update. There's no way to tell.
I tried ALL of the ideas above, but had no consistent reliable luck with any of them.
I found that Microsoft has had the problem reported to them (see link below). After a ton of time burn on this, I posted at the link below one way that I've been able to get around this archive-build issue.
Like the other fixes, it's not exactly logical, and nothing that you would think would work, but I've found the process to be repeatable, which is golden for me with tight timelines and having no time for this.
MS Visual Studio Developer Community Problem 507708
Posted on a Saturday morning, a sign of really needing to get around this urgently. I hope it helps you too.

Why android studio crashes automatically?

My studio's current version is 0.9.9 (recently updated), now here is the history:
There was some problems when I shifted eclipse to studio. The last problem happened when I updated it. My app became full of error. One of them was cannot resolve Symbol ActionbarActivity. And so many others. I spend a day behind it and gave up. I recreated my app from first to last with the same resources, then it became totally good to go. Three days later(today) again another problem raised. I turned on my laptop, opened Android studio and it says Rendering problem No Android SDK found. Please configure an Android SDK. But last night it was running fine. Now there is no design window.
I am wondering that why the errors come automatically. I don't do anythings in the settings stuff of the studio. I just develop my app. I just write code and make my app. So whats wrong with the studio. It crashes without any reason and I have to waste the half of the time. Is this a kind of jokes? It too much irritating. Updating latest version is not the reason. The problem is occurring from whenever I downloaded the Android Studio and shifted from Eclipse to it. With 2 or 3 days intervals it comes with new problem.
I suggest you to try fresh Installation or, As it happens because of some internal Intellij's libraries problem.

Errors using the apkTool

I have used this site to help me with the apkTool in the past, however I have today come up against an error I can't quite get my head around.
I am DE-compiling an APK which was written by a predecessor as it requires a few tweaks and he hasn't left any source files behind..
So, As far as I'm aware I have the latest tool available, using windows 7 64bit.
I have added the framework from my test tablet which the app runs fine on. And this is what I get..
This is the error screen
http://img199.imageshack.us/img199/4291/63yc.png
Anyone have an idea at what the issue is here? Any help really appreciated.
There's an open issue on a similar exception (scroll to the bottom):
https://code.google.com/p/android-apktool/issues/detail?id=477

Eclipse development woes

I would like to ask my fellow developers of their experience with eclipse.
I have recently started with eclipse and android, though the interface and development is not bad at all; but i have a major nagging issue.
Out of the blue eclipse or android compiler, am not sure, decides to go bonkers and misbehave. I spend so much time trying to debug and find errors in my code just to realize that a shutdown and restart of eclipse fixes it.
For example, one of my elements was returning null (using findViewById in android) - i spend about an hour trying to debug. Then decided to restart eclipse and it was fine. I wonder why?!
Is there anything that i ought to do ? ANything that i am missing with the eclipse settings. It really troubles me because it puts a brake on my development every now and then
Thanks
I personally never got comfortable with Eclipse and wound up settling on IDEA. When I had to work in C#, I found I was so stuck on it that I sprung out of my own pocket for the plugin to make Visual Studio work like IDEA
When I started to pick up Android, I begrudgingly went back to Eclipse, but once I needed to actually do something in Android, I checked back and discovered current version of IDEA (including the free one) supports Android development now too. Instructions for Eclipse all translate to it reasonably well, and the emulator won't change, so if that's where the issue is, you should find out reasonably quickly.
There are two general things that I suggest:
Fire up the emulator from outside of eclipse at startup time and leave it running (if you don’t already do this).
Add some memory to your development machine.

Android Apps Not Showing Up In AVD

I recently started messing with Android Apps, but I have had nothing but problems trying to get them into the Virtual Device for testing. For some reason, they never seem to show up in the AVD. It has worked one time, but that's it out of hours spent just trying to test one or two very simple apps.
I've redone the AVD setup many, many times, trying different settings and what not to no avail. I've followed multiple guides and tutorials to the letter to get it working, but they just refuse to show up in the list. :(
Any insight would be appreciated, thank you.
I would start by testing apps that are known to work. Here are sixty or so of them.
In particular, I would start with this one. Do not change anything. Do not import it into Eclipse. Just install Apache Ant (if you haven't already), and run ant install in the project directory with your emulator running.
Either this shows up in your emulator, or it does not.
If it does not, try reinstalling the entire SDK.
If it does, then you know that your base environment is OK, and you can start slowly determining the differences to figure out where things are going wrong.
Helping you is difficult right now because your symptoms are a bit generic. It could be that you are using Eclipse and Eclipse is having a problem. It could be that your adb daemon is having a problem. It could be that you don't have any activities in your manifest, so the application is actually installing but there are no icons in the launcher. And so on.

Categories

Resources