Error: can only iterate over an array or an instance of java.lang.Iterable

后端 未结 2 588
醉酒成梦
醉酒成梦 2021-02-06 10:22

please help me with my error can\'t seem to make it work because of that can only iterate over an array or an instance of java.lang.Iterable. i want to create a barcode and read

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 11:01

    I assume Nodecollection is a com.aspose.words.NodeCollection.

    If you want to use the foreach syntax you better do:

    Node[] shapesArray = shapes.toArray();
    for (Node node : shapesArray ){ ...
    

提交回复
热议问题