How do I use this Android Emulator Bug Patch? - android

2 Days ago I posted a question regarding my emulator displaying weird when changing screen sizes (as seen here.
I eventually found what seems to be a patch for this particular bug over here. But, and I do feel stupid asking this, how do I use this patch??
I've never used a patch and this doesn't seem like a simple exe that I run...
Any Ideas?

You should use the patch program to apply it to your source code.
Usually, you can run patch -p0 < the-patch-file. But you may have to adjust the p value parameter.

The detailed process of building android tools from sources described on the android source site. The adt plugin stored in development/tools/eclipse.

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.

Trouble with Visual Studio 2015 and Xamarin (Android Development)

I need some help with the designer of the visual studio/xamarin on the android.
I'm kinda noob with development, but I was hoping to do some examples, but the designer isn't showing up...
The tutorial videos, from the Xamarin itself, only says it need to create a new project and play with the designer, but when I do that, the designer is empty and I can't do nothing...
Here some pictures from what I have and from what I see on videos:
There's a couple things I'm thinking here. It's quite possible that your installation of Xamarin didn't go according to plan. Check your detailed Visual Studio version information in "Help -> About -> Copy Detailed Info".
Additionally, you might also be running on an outdated version of the Android SDK or there might be an issue with your Java config. Ensure you've got the Android SDK installed and updated and that you're using a current version of the Java SDK.
I also see there's a white box showing up on your Designer screen. Does that ever populate with an error? Usually, that will show some info on what exactly is going wrong.
Lastly, you can also check your logs in the following directory for more hints as to what's going on:
%LOCALAPPDATA%\Xamarin\Log
I hope this helps!

Android 9 patch won't load

I have a question regarding Android 9 patch. Basically when I click and open the 9Patch tool, the screen went blank and can never start. I have tried to drag a picture into it, and it just crashes. Things I have tried are:
re-download Android SDK and re-install
re-start my computer
I am sure I have downloaded the correct version of Android SDK, so my guess is maybe it has nothing to do with Android, but settings in my computer, but I don't know where and how to fix it. So any suggestions and advices are welcome!! Thanks!
This seems to be a known problem on Mac.
https://code.google.com/p/android/issues/detail?id=57473&can=1&q=draw9patch&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
There seems to be a patch available from Apple which should fix this problem.
Also, check this thread.
draw9patch just hangs on Mac 10.7.5
Try to use Android Asset Studio
This link presents Icon generators and Simple nine-patch generator. it's very simple.

Android 9-patch images don't stretch correctly

I have the exact same problem as this guy, only the solutions proposed don't work for me.
my 9 Patch Image stopped working
In eclipse, my 9-patches look as they should, but when running the app on my device, they stretch like a normal png-image.
I just updated to the latest sdk version, then I tried the fix proposed in the question linked above, but it didn't help.
Is there anyone else who has the same problem, and for whom the mentioned fix doesn't help?
Help would be much appreciated!
After my happy comment in April, the error reappeared after some image manipulation. Then I got it working by redrawing the image borders. I now believe that the problem was that one (or more) of the pixels on the border was not completely transparent. I find it odd, though, that the compiler doesn't react on that, the file suffix was .9.png, after all... And I don't understand why it was shown correctly in the eclipse preview.
Double-check that you ARE using the very latest SDK (r17), and then do a full, clean rebuild of your project.
I've seen this issue many times, but even when the SDK bug was there a full rebuild would fix it. Since r17 I've not seen it.

Eclipse: intellisense laggy, how to change functionality

I've recently moved from VS to eclipse and am using the intellisense functionality. I came across a tutorial a week ago telling me to add 'source' directories to the android sdk to improve the speed of intellisense.
Anyways i still find it a bit sluggish and i was curious if there was a way to change how it functions from a 'remove suggestions' from the list to a 'highlight the most accurate so far'. This I BELIEVE would solve some of the lag issues.
I just answered a similar question over here:
How do I defeat Eclipse's autocomplete feature?
"There's a bug in Eclipse 3.6.1 that affects code completion (Code Assist). There is supposed to be a patch that will be in 3.6.2 when it's out, but this post from the Android Dev Google group shows a work around that patches 3.6.1. I've tried it and it makes a world of improvement.
https://groups.google.com/d/msg/android-developers/El-6ufT3F7E/uhxmLoUqnQ8J
"
It's called content assist in Eclipse and you can change almost everything in it.
You find it under Eclipse => Preferences => Java => Editor => Content Assist
Doesn't seem like at this point in time it is possible to duplicate this functionality. I'll keep an eye on this answer set should anybody choose to prove me wrong.

Categories

Resources