Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use for some reason #110

Closed
AndroidDeveloperLB opened this issue Dec 5, 2023 · 20 comments
Closed

Can't use for some reason #110

AndroidDeveloperLB opened this issue Dec 5, 2023 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Dec 5, 2023

I wanted to see if this plugin can help to optimize some VectorDrawable files of Android projects inside Android Studio.

I tried to install and use this plugin but it doesn't seem to do anything and even show if there was an error:
alexjlockwood/avocado#45

Was told to install Node, and so I tried to install it from here, including all that it provides (waited for about half an hour to install all extras of it):

https://nodejs.org/en/download/

Here are the recent apps that were updated/installed:

image

What have I done wrong?

@Drjacky
Copy link
Owner

Drjacky commented Dec 7, 2023

What do you get when you run this command in your command prompt: node --version

@Drjacky Drjacky self-assigned this Dec 7, 2023
@Drjacky Drjacky added the question Further information is requested label Dec 7, 2023
@AndroidDeveloperLB
Copy link
Author

@Drjacky I get this:

v20.10.0

@Drjacky Drjacky added bug Something isn't working and removed question Further information is requested labels Dec 9, 2023
@Drjacky
Copy link
Owner

Drjacky commented Dec 11, 2023

Can you try the attached exe file in your command prompt like: \path\to\avocado.exe --version and let me know if it works for you?
avocado.zip

@AndroidDeveloperLB
Copy link
Author

@Drjacky I got this:

PS C:\Users\User\Desktop\avocado> .\avocado.exe --version
Program 'avocado.exe' failed to run: The specified executable is not a valid application for this OS platform.At
line:1 char:1
+ .\avocado.exe --version
+ ~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ .\avocado.exe --version
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

@AndroidDeveloperLB
Copy link
Author

I should mention that the OS is Windows 11 home.

@Drjacky
Copy link
Owner

Drjacky commented Dec 12, 2023

Could you please to the latest node? https://nodejs.org/dist/v21.4.0/node-v21.4.0-x64.msi
and also, is this a 64-bit or 32-bit windows machine?

@Drjacky
Copy link
Owner

Drjacky commented Dec 12, 2023

and the User in C:\Users\User\... is a sample name for the comment, right? in your side, it's your actual username, right?

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Dec 12, 2023

I installed this one before:

https://nodejs.org/dist/v20.10.0/node-v20.10.0-x64.msi

How come you've found a newer one? It says on the website that latest is "20.10.0 (includes npm 10.2.3)".
It is a 64bit PC. And it's the user name.

Anyway, tried again the plugin on Android Studio, and nothing happens.
Maybe I try on some VectorDrawable file that can't be optimized? Can you please offer a sample that it should be able to do anything?
Also, what should happen for a file it can't optimize? Does it show some message?

@Drjacky
Copy link
Owner

Drjacky commented Dec 14, 2023

Can you please offer a sample that it should be able to do anything?

App Icon on any new created project is a good example.

The vector should be under drawable or drawanle-... folder.

Does it show some message?

Not in this version

@Drjacky
Copy link
Owner

Drjacky commented Dec 16, 2023

@AndroidDeveloperLB Can you try this attached exe in your command prompt like: avocado.exe --version and let me know if it works this time?
avocado.zip

@AndroidDeveloperLB
Copy link
Author

Running the command it shows "1.0.0". But what do I do with this? Isn't it supposed to be installed in the IDE as a plugin ? I'm supposed to use this file somewhere?

As for a sample file using a new project, still nothing happens there.

@Drjacky
Copy link
Owner

Drjacky commented Dec 17, 2023

Running the command it shows "1.0.0". But what do I do with this? Isn't it supposed to be installed in the IDE as a plugin ? I'm supposed to use this file somewhere?

As for a sample file using a new project, still nothing happens there.

No, it's just for helping me to debug the plugin on a Windows machine. I appreciate your patience!

@Drjacky
Copy link
Owner

Drjacky commented Dec 22, 2023

Hopefully, it will be fixed by 2.0.1; It is not yet released on the JetBrains Marketplace though.

@Drjacky
Copy link
Owner

Drjacky commented Dec 25, 2023

The plugin has been released. I close this issue; feel free to comment if it still doesn't work.

@Drjacky Drjacky closed this as completed Dec 25, 2023
@AndroidDeveloperLB
Copy link
Author

@Drjacky I think it works, but it seems as if the IDE isn't aware of what's going on, so there is no progress, and after it's done, I need to re-open the file to get the new content. Watch:

studio64_2023-12-25_16-42-11.mp4

I have some questions:

  1. Possible to set it to run on all/multi-selection? Maybe via Lint?
  2. How reliable is it? Is it promised to have exact same visual output as original? If not, is there a way to compare before&after, to see if it's ok?
  3. If I want to use this on another PC, what are the minimal steps? I think I've installed more than I needed for this...

@Drjacky
Copy link
Owner

Drjacky commented Dec 25, 2023

  1. Possible to set it to run on all/multi-selection? Maybe via Lint?

In the next version(s), I'll add optimize all the vectors in a directory.

  1. How reliable is it? Is it promised to have exact same visual output as original? If not, is there a way to compare before&after, to see if it's ok?

I have used the exact application from alexjlockwood/avocado; but have not used all it features yet as I wanted to make sure it works on a Windows as well.

  1. If I want to use this on another PC, what are the minimal steps? I think I've installed more than I needed for this...

There is no need to install NodeJS on the machine anymore. I'm going to edit the readme file in the next release.

the IDE isn't aware of what's going on, so there is no progress, and after it's done, I need to re-open the file to get the new content.

I'm aware of this. It's an IDE performance issue. I need to find a way to force the file to be refreshed.


Thanks for let me know

@AndroidDeveloperLB
Copy link
Author

@Drjacky

  1. Maybe possible via Lint too? Meaning Code-analyze , so that we could choose the scope of where to find places to optimize?
  2. But can it be trusted to have same visual content?
  3. Thank you!
  4. ok. Maybe have a progress bar somewhere, at least?

@Drjacky
Copy link
Owner

Drjacky commented Dec 26, 2023

the IDE isn't aware of what's going on, so there is no progress, and after it's done, I need to re-open the file to get the new content.

This has been fixed on 3.2.2.

@AndroidDeveloperLB
Copy link
Author

@Drjacky
My notes about 3.2.2:

  1. Now it gets updated on its own. No progress shown, but at least it's relatively quick.
  2. It formats the content not according to my setting. I need to re-format it after it does it.
  3. I got low-memory message. Wonder if it's related. I went over multiple files.

@Drjacky
Copy link
Owner

Drjacky commented Dec 26, 2023

My notes about 3.2.2:

  1. Now it gets updated on its own. No progress shown, but at least it's relatively quick.
  2. It formats the content not according to my setting. I need to re-format it after it does it.
  3. I got low-memory message. Wonder if it's related. I went over multiple files.

Please open a new issue mentioning these. This one is getting longer and contains different issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants