ashung / android_res_export Goto Github PK
View Code? Open in Web Editor NEWExport Android resources in Sketch, bitmap assets, nine-patch, vector drawable, app icon, shape XML..
License: MIT License
Export Android resources in Sketch, bitmap assets, nine-patch, vector drawable, app icon, shape XML..
License: MIT License
Android Res 3.6.0 in Sketch 52.2
Observed
Did something change? When bulk exporting lots of assets, its more convenient to leave the drawables arranged in a grid in the Sketch artboard, rather then crushed on top of each other at 0,0. Is it possible to have the plugin do this operation during export? Did it used to do this? Am I missing an update somwhere?
I keep getting the error: "Bitmap layer can't convert to Vector Drawable".
Hi, I installed this plugin today via SketchRunner, and I installed svgo (version 1.0.3) and svg2vectordrawable (version 1.1.9) globally with npm. I used New Vector Drawable Assets
a few times, then I tried Export Vector Drawables
. It fails with the error "You need to update svg2vectordrawable", even though I have the latest version. Any idea what's going on?
Sketch Version 49
Android Res Export 2.3.14
I create page with "New App Icon (Legacy)" and then "Export App Icon", it reports "Can't find Android app icon inside current page."
Running the following script (extracted from export_app_icon.cocoascript
),
var doc = context.document;
var page = doc.currentPage();
var iconNormal = page.layerWithID("ic_launcher"),
iconRound = page.layerWithID("ic_launcher_round");
log(iconNormal)
log(iconRound)
iconNormal
and iconRound
are both logged as (null)
.
However if I traverse the layers,
for (var i = 0; i < page.layers().count(); i++) {
var layer = page.layers()[i];
if (layer.name() == "ic_launcher") {
iconNormal = layer;
} else if (layer.name() == "ic_launcher_round") {
iconRound = layer;
}
}
log(iconNormal)
log(iconRound)
iconNormal
and iconRound
can be found.
If I add the above code to export_app_icon.cocoascript
, app icon can be exported as expected.
Crashes when trying to cancel the nine patch preview window
Nine-patch export was working good until v3. I'm using latest Sketch (51.3 now).
Now it creates half-pixels on that solid black 1px lines for patches that should be solid.
See the example screenshot, zoom in on the top patch.
https://imgur.com/a/OVyfms3
On the older version it was fine (v2.3).
Also, I noticed that under High Sierra, plug-in has problem with exporting to newly created folders (I presume it's due to writing permissions). I go round this problem by exporting to existing folder (Desktop for example).
Sketch 59版本制作点九切图后,执行导出点九切图左下未正常生成黑线
Wanted to convert a PNG image to Vector Drawable, but no output or error are shown. Steps I'm doing:
1- Open PNG image in Sketch
2- Select the image from the left pane
3- Plugins -> Android Res Export -> Export Vector Drawable
4- Nothing happens, and no error shown
Also tried:
1- Open PNG image in Sketch
2- Select the image from the left pane
3- Plugins -> Android Res Export -> New Vector Drawable Asset
4- Select the folder created in the left pane, then
3- Plugins -> Android Res Export -> Export Vector Drawable
4- Nothing happens, and no error shown
This was tested on Sketch 41.2 (MAC)
After updating to latest, whenever i try and export an existing vector drawable (that exported fine before), i get a warning that says You can't export assets to this folder
.
I tried changing the export folder to a variety of locations incase something was blocking them, but nothing is working.
创建点9图片后,试用预览显示的都不对。
创建点9点时区域也和图形不对
Hi there!
This is a quick note to remind you that Sketch 45 will include a plugin update system.
It would be awesome if you could add support to it (it's really easy!) before Sketch 45 comes out. Ideally, you should release an update for your plugin while we're still in Sketch 44, so your users will have a nice & easy experience when 45 is released.
For more details, please check http://sketchplugins.com/d/229-updating-plugins and http://developer.sketchapp.com/introduction/updating-plugins/
Thanks in advance!
Just tried out your plugin, it's give hopes for Android UI designer :)
However the Nine-Patch export is not working. I tested it on Sketch 46.2
Upon trying to export a Vector Asset, I get this pop up even though I've already run the command to install svg2vectordrawable.
I've reinstalled and updated node (11.9.0), svg2vectordrawable (2.6.5), and android_res_export (3.8.0) and even resorted to restarting my computer with no avail. MacOS 10.12.6
Here's the log from the install.
➜ ~ sudo npm install -g svg2vectordrawable
/usr/local/bin/s2v -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
/usr/local/bin/svg2android -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
/usr/local/bin/svg2avd -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
/usr/local/bin/svg2drawable -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
/usr/local/bin/svg2vector -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
/usr/local/bin/svg2vectordrawable -> /usr/local/lib/node_modules/svg2vectordrawable/bin/svg2vectordrawable
+ [email protected]
added 58 packages from 89 contributors in 3.105s
HI,
I'm trying to export the nine-patches and I'm getting this on the console: "launch path not accessible".
Nothing happens. Running 2.3.1 version.
Thanks
Environment:
Sketch 48.2, Android Res Export 2.3.7.
help, sketch 72.4 can't work
There aren't any zip file to be download following the steps described here.
When we are redirected to the page to get the plugin the title of this message is shown...
System: MacOS Mojave 10.14.5
Sketch: 58
Terminal: zsh
Node.js installed
svg2vectordrawable installed
But when I use the plugin to export, it still prompts me to install node.js and the command line for svg2vectordrawable.
Now that vectors are <v21 compatible there should be an option to export without the -v21 resource modifier. If there's currently a way to do this let me know.
Can not download V 4.X,无法下载点击下载链接显示找不到内容
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.