nuclearpasta / react-native-drax

A drag-and-drop system for React Native
MIT License
552 stars 69 forks source link

The original database cannot run on the Android platform #174

Open Qy742698 opened 1 month ago

Qy742698 commented 1 month ago

ERROR TypeError: Cannot read property 'LongPressGestureHandler' of undefined

lafiosca commented 1 month ago

Have you properly installed react-native-gesture-handler?

Qy742698 commented 1 month ago

@lafiosca yes,I report this error when I run on android.

Qy742698 commented 1 month ago

@lafiosca Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. What's the reason for this?

LunatiqueCoder commented 1 month ago

@Qy742698 It means that you have a bad import. Can you come back with a reproduction repository? It will be easier to help you out.

Qy742698 commented 1 month ago

When I use this drax library, I report ERROR Warning: Warning: ref.measureLayout must be called with a ref to a native component. Is there any alternative, in the new reactive-native architecture?

Satyamsingh-arch commented 1 month ago

After I enabled the fabric configuration in iOS, the drag and drop didn't work. After looking at the source code, it seems that the measureLayout method of the DraxView component is not working. Is there a solution to this?

Qy742698 commented 1 month ago

@lafiosca The measureLayout method has been deprecated in the new architecture of react-native. Is there any other method to replace it?

Qy742698 commented 1 month ago

@Satyamsingh-arch I use this method and still can't drag,UIManager.measureLayout( findNodeHandle(view), nodeHandle, ()=>{}, ()=>{ measureCallback } )

Qy742698 commented 1 month ago

@LunatiqueCoder The measureLayout method has been deprecated in the new architecture of react-native. Is there any other method to replace it?

lafiosca commented 1 month ago

Unfortunately this library is not being actively maintained and has not been updated to work with the latest React Native.

Qy742698 commented 1 month ago

Is there any solution? I need to use this library in the new architecture

lafiosca commented 1 month ago

I am sorry, but I do not have a solution for you. It sounds like this will require someone to volunteer time and effort to find a workaround or update the library.

Qy742698 commented 1 month ago

If no one maintains it, can your warehouse be closed because you need to use your warehouse to adapt to the new architecture?

Qy742698 commented 1 month ago

@LunatiqueCoder Can you replace this? I used a code you submitted earlier, but I still couldn't drag it.

agonselimi commented 3 weeks ago

The library is not working for Android (Items not dragging), on React native version 0.74.5, can we give an update to the library with the latest versions?

On iOS seems to be working just fine.

Qy742698 commented 3 weeks ago

@agonselimi This function can run only in the old architecture, but not in the new architecture.

agonselimi commented 3 weeks ago

Does this really cool library have a maintainer? Does it require a lot to migrate to the new architecture, and do an update of the library?

Qy742698 commented 3 weeks ago

@agonselimi The library is left unmaintained, and the workload of porting to the new architecture is heavy.

lafiosca commented 3 weeks ago

@agonselimi Unfortunately not. I have not been involved in active React Native development for quite sometime. At this point I think it might be best for someone to reboot the library from scratch with similar principles.

Qy742698 commented 3 weeks ago

@lafiosca Can you close the warehouse first, because no one on your side maintains it. We are using the latest rn architecture, but you cannot run successfully in the new architecture.

Qy742698 commented 3 weeks ago

@LunatiqueCoder Can the code you modified before run on the new architecture?

Qy742698 commented 3 weeks ago

@LunatiqueCoder Okay,thank you,because we need to use this third-party library in the new architecture, because the parameters of measureLayout are different in the old and new architectures.

LunatiqueCoder commented 3 weeks ago

@Qy742698 @lafiosca

I had a look and opened a PR here:

Please review and test 🙏

Qy742698 commented 2 weeks ago

@LunatiqueCoder I'm testing it now. I'll tell you the results.

LunatiqueCoder commented 2 weeks ago

@Qy742698 Let me know if you need help testing. You can also refer to #177, it might be helpful.

Qy742698 commented 2 weeks ago

@LunatiqueCoder I just tried it on the new architecture, and I still can't. What about you?

Qy742698 commented 2 weeks ago

@LunatiqueCoder I only modified the code based on the first PR submitted by you. Other codes are not modified. Do you need to modify the code of the second PR submitted by you?

Qy742698 commented 2 weeks ago

@LunatiqueCoder #177 Does this also need to be modified synchronously?

LunatiqueCoder commented 2 weeks ago

@Qy742698 You don't need the changes from #177, but you can follow the HOW TO test steps. If you change directly in node_modules/react-native-drax/src THAT WILL NOT BE ENOUGH! Please add me on Discord and let's continue there.

Qy742698 commented 2 weeks ago

@LunatiqueCoder Do you have WeChat? I haven't used discord,You can send me your discord account and I'll add you.

Qy742698 commented 2 weeks ago

@LunatiqueCoder My account number is buyaobilian0703.

Qy742698 commented 2 weeks ago

@LunatiqueCoder Can you succeed in the new architecture? Can you drag components?