zmalltalker / sketch-android-assets Goto Github PK
View Code? Open in Web Editor NEWGenerate Android assets in Sketch
License: GNU General Public License v3.0
Generate Android assets in Sketch
License: GNU General Public License v3.0
The file .android_assets is created but none of exports.
Sketch Version 3.2 (9961)
Would it be possible to have an option to export without a background?
If I generate android assets from a document with different pages and artboards, some uf them are misplaced and add transparent parts to the side of the images. I tried to attach two examples which where generated to make it a bit easier to understand the issue.
I tried already to delete and re-create the slices but it didn't help so far.
If you compare these two images, you will see, that the _fr version (1st file) is fine, but the _de version (2nd file) is kind of moved to the right and on the left there is a transparent part.
It would be really cool (if possible) if you could create 9 patch assets too. The reason it doesn't work now is that the black bars on the side are scaled too, making them not always 1px. Maybe there is a way you could use the slice name to tell if the user intends the asset to be 9 patch.
I have 96x96px Artboard. When Artboard is selected export results in 136x136 px PNG, when Slice is selected it's OK 96x96px. Graphic is the same size, but there is 20px padding on Artboard export.
The plugin was working in Sketch 40.x even though it has been labelled as legacy plugin, but in v41, it no longer works. It is not exporting anything, and it strangely duplicated the selected artboard as a result.
@zmalltalker Wondering if you have some time to look at it and rewrite a working one? I wish I could write myself, but not really an engineer here :)
I choose export from hdpi first time, and this plugin remembers my choice. However a later time I want to export from mdpi, how do I change the default export base?
Breaks on the following line:
slice = [MSSlice sliceWithRect:rect scale:factor];
With the error: "ReferenceError: Can't find variable: MSSlice."
Having a hard time understanding which base setting to choose if I want to design at half the size of a 1080x1920 size?
How do I select which assets to export? Do I have to take out the ones I want and put them in a separate sketch document, then generate from there?
It would be great if the possibility is given to export only single artboards instead of the whole document everytime. Or is it actually given, but I wasn't able to find? :)
My Sketch crash every time i press on the export, and sometimes we need to open a new document and cmd+c and cmd+v og be able to export the assets. 2 huge issue i hope you are aware off.
We have this issue on 2 computeres that is running Sketch 3.4.3 (16044)
I have attached the Crash report.
Crash.txt
For some reason the file .android_assets gets generated and saved to the same directory as the sketch file every time i try to export android assets. Is this a bug or a feature?
Hey @zmalltalker I use this plugin every day, it's quite useful 😄
Unfortunately it's not working properly in Sketch 3.4 – all of my assets are larger than they should be. For instance, a 96 x 96 asset has turned into a 481 × 145 asset somehow. Hopefully you can fix it soon!
It's recommended to put launcher icons in mipmap directories (mipmap-mdpi, mipmap-hdpi, etc.).
I suggest to add dialog with selection between mipmap and drawable.
This could be me, but I am designing in xxhdpi and the exported assets are the wrong size. They are one size to large. What am I doing wrong?
Thanks,
I'm using this plugin before Sketch 3 came.I upgraded my sketch version to 3.3.1 now the plug seems not working for generating the assets..
Do you plan to update this plugin for Sketch 3? Although there is better Export in Sketch 3 I would still use it. ETA?
I created a document with 3 pages. Each of these pages has 4 artboards and 4 slices for export. If I Generate Android Assets, the artboards and file names seems to be totally mixed up. With a bit of investigation I noticed, that all the artboards in the pages are filled with the contents of the page which is choosen while execute the Generate Process. Means:
The document structure is built like this:
-- PageGerman
---- ArtboardExample1_de + Slice
---- ArtboardExample2_de + Slice
---- ArtboardExample3_de + Slice
---- ...
-- PageFrench
---- ArtboardExample1_fr + Slice
---- ...
-- PageEnglish
---- ArtboardExample1_en + Slice
---- ..
Good Morning / Afternoon / Night (depending on your timezone :)!
As you probably know, Sketch will switch its scripting backend from JSTalk to CocoaScript in the upcoming version 3.0.2.
As a result of this change, some plugins will stop working unless you fix them.
Guess what? Yours seems to be one of them. But worry not! We've identified some of the issues, and the fixes are easy to do (so far :)
Please take a look at the info we've compiled at https://github.com/sketchplugins/cocoascript-migration/, make your changes, and test your scripts with the latest beta. Please don't hesitate to get in touch if you need more help!
Sorry about the extra work, and thank you for your contribution to the amazing Sketch Plugins community :)
Ale M — Bohemian Coding
In Sketch 3 when exporting through the plugin the background of the slices are not transparent. On the contrary, when exporting through the native Sketch feature (File > Export) the slices do have a transparent background...
How can I export against a transparent background?
PS: Please also tell people they need to select the slices before running the plugin.
Hi there,
we just added a new keyboard shortcut to Sketch for an upcoming version, and the shortcut you're using (Cmd + Shift + A) will clash with that.
I'm letting you know in advance in case you want to modify the shortcut in your Plugin. Thanks in advance!
Pixi-Stix has a branch of your code (https://github.com/pixi-stix/sketch-mobile-assets) where assets are organized into folders, saving lots of time. Though one feature that lacks in comparison to sketches default exporter, is the feature where you can click on the slice and select ""Export Group Contents Only", this prevents you from having to hide other background layers, again, saving lots of time. It would be great to implement a similar feature. Thanks!
Ps. Sorry for the "pull request earlier", i'm a github noob :)
No folders are getting created. I also don't get any prompts or messages at all.
When exporting assets, the art board that has selected sliced files is duplicated. No files are exported to designated location.
At least, in Google we design using 1px = 1dp, MDPI.
Sketch Version 3.1.1 (8761)
Hi,
Generate Android Assets has stopped working for me in the 3.3 series, running Version 3.3 (11920).
No assets are exported any longer, so I have to copy everything over to a Sketch 3.2 version to export. Any ideas? Thanks for building an awesome tool!
Pierre
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.