react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

cannot find symbol new VectorIconsPackage()

Open sayedatif opened this issue 10 years ago • 21 comments

Hey guys i am trying to use react-native-vector-icons in my project but facing problem while building my project error2 here is my code for MainActivity.java protected List getPackages() { return Arrays.asList( new MainReactPackage(), new VectorIconsPackage(), new MapsPackage(this) );

please help guys.Thanks in advance

sayedatif avatar Jul 08 '16 07:07 sayedatif

Same issue here, had to manually remove it

mateoKaradza avatar Jul 08 '16 12:07 mateoKaradza

Can you tell me how you removed it manually?

sayedatif avatar Jul 09 '16 05:07 sayedatif

With removing I meant not using these icons, I tried to remove it using rnpm unlink and uninstall but it didnt help, so I had to go to MainActivity.java and remove it myself.

mateoKaradza avatar Jul 09 '16 07:07 mateoKaradza

Try integrating manually with the step-by-step instructions if rnpm fails.

oblador avatar Jul 10 '16 22:07 oblador

@oblador Followed the manual instruction, still no good @mateoKaradza doesn't removing it disables the usage of this repo?

aviadhahami avatar Aug 13 '16 12:08 aviadhahami

Why is this issue closed? Is there any fix to this? I'm still getting this error even after manual step-by-step insturctions

Boredude avatar Nov 13 '16 20:11 Boredude

Same

aviadhahami avatar Nov 13 '16 20:11 aviadhahami

@Boredude: To use the basic functionality you only need the fonts themselves. It works just fine for a great deal of projects including the example project, the only ones i know of having trouble are using rnpn. It's very likely you overlooked a manual step or have a bad java/android setup. If you are certain it's a bug with this project and not yours, please post a link to a repo with minimal code reproducing this bug and I'll look into it.

oblador avatar Nov 13 '16 20:11 oblador

@oblador I intentionally skiped couple of steps in the manual installation due to this message

These steps are optional and only needed if you want to use the Icon.getImageSource function or using custom icons in the Icon.ToolbarAndroid component.

Apparently those steps were critical and once I did them I got this working.

Thanks

Boredude avatar Nov 13 '16 23:11 Boredude

Apparently those steps were critical and once I did them I got this working.

@oblador maybe its worth updating the readme

aviadhahami avatar Nov 14 '16 08:11 aviadhahami

@aviadhahami That by ignoring installation steps you cannot expect it to work? :-)

oblador avatar Nov 22 '16 17:11 oblador

@oblador The readme states that these steps are optional. However they were mendatory. I think this is what @aviadhahami meant was worth updating

Boredude avatar Nov 22 '16 17:11 Boredude

They are optional for most use cases and the docs state when they are mandatory:

These steps are optional and only needed if you want to use the Icon.getImageSource function or using custom icons in the Icon.ToolbarAndroid component.

oblador avatar Nov 22 '16 17:11 oblador

FYI, if you use react-native link to install and it fails with this error, its because its missing the compile project(':react-native-vector-icons') under dependencies at android/app/build.gradle

also to make sure you don't re-link other packages you can do react-native link react-native-vector-icons for specific linking

Kopatch avatar Jul 05 '17 11:07 Kopatch

I used react-native link, but it did not work on android - iOS was fine.

I realized that this line import com.oblador.vectoricons.VectorIconsPackage; was missing in MainApplication.java

Hope I could help!

fmoessle avatar Aug 30 '17 13:08 fmoessle

this kind of errors happen usually when there is missing dependency or import . check for those issues . in build.gradle or main java file .

sadi304 avatar Oct 13 '17 02:10 sadi304

@fmoessle Putting 'import com.oblador.vectoricons.VectorIconsPackage;' in MainApplication.java helped. Thanks.

adidahl avatar Feb 21 '18 11:02 adidahl

Add this import on MainApplication.java import com.oblador.vectoricons.VectorIconsPackage;

this solved my problem. Hope it helps

jpabs avatar Sep 09 '18 03:09 jpabs

Add this import on MainApplication.java import com.oblador.vectoricons.VectorIconsPackage;

this solved my problem. Hope it helps

no, it's not helping, still have the same issue

meitix avatar Sep 28 '18 21:09 meitix

@Kopatch worked here, thanks!

lucasviga avatar Oct 25 '18 04:10 lucasviga