Execution failed for task ':react-native-ar-viewer:compileDebugKotlin'
HimanshiVashist-dev opened this issue · 9 comments
I cloned the react-native-ar-viewer repository and was able to run the example project without any issues. However, when I tried to use the package in my own project, I encountered the following error:
I followed the instructions in the package's README file, but I'm still getting this error.
The error message specifically states that there is a type mismatch in the ArViewerView.kt file on line 291, where an inferred type is MotionEvent? but MotionEvent was expected. This suggests that there may be an issue with how the MotionEvent type is being used in the code.
I'm not sure how to resolve this issue, so I would appreciate any help or guidance on how to fix this.
Thank you for your assistance!
Hi! Could you give me an example of the code you used and tell me how you initialized your project ?
Thanks :)
I created a React Native project by running the following command: npx react-native init demo.
Afterwards, I followed the steps outlined in the README.md file.
Step 1: I executed the command npm install react-native-ar-viewer to install the necessary package.
Step 2: I added the following code snippet to the AndroidManifest.xml file:
<meta-data android:name="com.google.ar.core" android:value="required" tools:replace="android:value" />
Step 3: I added the xmlns:tools="http://schemas.android.com/tools" attribute to the tag.
However, when I tried to run the application, I encountered an error which is mentioned in the issue.
For your reference, these are the versions of dependencies I am currently using.
I successfully reproduced the issue, i'm currently working on it
Hello ! This should be fixed, please update to 0.1.17 :)
Thanks for your answer, could you please send me your android/app/src/main/AndroidManifets.xml ?
Alright, i guess the readme isn't really clear about it, sorry ! I'll change it asap.
I'm glad you get it working, and I'm still here if you need me again !
Glad to hear that! Thanks for helping out :)