Open Julien-R44 opened 2 years ago
Ok sorry I found where the problem came from I may have opened the issue a little too quickly though it is not in my habits, here is the solution:
This code causes the error :
draw({ canvas }) {
// const paint = new Paint()
const rect = createRectF(0, 0, 10, 10)
},
This code resolve the error :
draw({ canvas }) {
const paint = new Paint()
const rect = createRectF(0, 0, 10, 10)
},
So basically you just have to create an instance of Paint before doing anything if I understand correctly. Is this a normal behavior? I was sure I didn't modify any code but finally I did, sorry! At least this issue will serve the next person who makes the same mistake as me 😅
@Julien-R44 dont be sorry you found an issue. It means i have a circular import dependency somewhere in the lib. Thanks you for investigating! Use your trick for now, i will find and fix the issue
Thanks for this great lib. I was able to use it for an hour, everything worked perfectly. Then I tried a rebuild after an
ns clean
, and it doesn't work anymore and I don't really understand why since I doesn't changed anything since my last builds. Here is the error I get when I launch my application on the android emulator:ReferenceError: Cannot access 'CanvasBase' before initialization
Here the import line that cause the error :
If I remove the
createRectF
, the error disappears and the application runs. I tried to replacecreateRectF
bycreateRect
but the error still occurs.Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
If you have no idea where it can come from I will try tomorrow to create a repo with where the error is reproducible but I'm not even sure I can do it because the error appeared when I did not change anything in the code. It seems to be more of a configuration/build problem on my side. I tried to reclone my project, and rebuild it from scratch but it's still the same. However, I'm a bit stuck because I have no way to make this error disappear.