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.
Related
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.
Everything with my android studio was working fine until I came across this weird thing that when I add Views inside a CardViewthe IDE is warning me telling that for example "TextView is not allowed here". I have done this a thousand times before and It was absolutely fine.
Here is a List of the things I have tried
1. Restarted the IDE.
2. Restarted the entire system.
3. Tried the Invalidate Caches/Restart thing.
4. Cleaned the peoject.
5. Verified the support library version and files
6. Banged my head against the wall.
Nothing worked, here are some additional details
IDE version 1.3.1, SDK tools is using API 22 fully updated
And one more thing is suggestions are not shown under the CardView in XML, i guess both these problems are related.
I have seen a similar question here, but unfortunately it didn't help me.... Please someone find a fix for this problem...
Well after spending a day searching around in the Intelli J IDEA docs, I was able to find a solution for this problem. It has to do with the corrupted project metadata and other project related data that is common across projects loaded into Android Studio, so naturally I just opened a backup of my project that I had backed up when the problem did not exist. And I solved it....
Hope this'll help you...
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.
Hey so I have been having this issue for a few weeks and it's incredibly bothersome. I have looked at the other posts regarding the issue and tried everything without success. This inculdes:
Checking that all .xml files are named correctly,
adding to the top of all .xml
files,
renaming package (which it does not let me because it says I have to
fix the errors first )..
I have also tried removing newer .xml files. no luck.
the error occurred when I did a routine clean the other week. I immediately proof read then removed the view_feed_event.xml file which I had just created and re-cleaned with no luck
thus far I have not been able to figure out the problem and it has persisted.
the only other thing I can think if is I added the App Engine SDK a few days prior to mess around with that
heres a screenshot, standard output for a J.java generated error.
any help would be greatly appreciated and I will make sure to accept the answer that resolves the issue.
Kind regards,
- Pete
Well, the comment from Ken Wolf proved to be the correct one...
I did not have Android SDK Build-tools installed and there were several small errors in my xml that were not flagged as a result.
the resolution to this involved: Window -> Android SDK Manager -> check and install the tools then restart the ADT
thanks again ken for a timely response, you nailed it
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.