ReferenceError: Can't find variable: _UIManager - android

First, I am not good at English. I'm sorry.
I get the following error on every touch event
All that has been modified is to install the react-native-scroll-menu package.
I deleted node_modules and installed a new one, but the error still occurs.
I can't find this case even after searching, please tell me where the error is coming from
This error only occurs on Android.
enter image description here
enter image description here

We ran into this problem and only found your posted question, and we've managed to solve it for us but the solution may very well not work for you. (But better to post it in case it helps someone).
Our issue was caused by a babel plugin since we were using a third party service called FullStory.
Again it seems unlikely you're using this plugin, however commenting out the following two lines from our babel.config.js and doing a yarn start --reset-cache got rid of the error for us.
'#fullstory/react-native',
['#fullstory/annotate-react', { native: true }],

Related

After setting up admob my app crashes without error

I set up admob using npm i --save react-native-admob#next and after that implemented of course in my XML file for android the right app-ID which was given to me by admob. I did it just like that:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-****************~*********"/>
Also I implemented into the app gradle file following line:
implementation 'com.google.android.gms:play-services-ads:20.2.0'
The last step I did was going into the nodemodules/react-native-admob/build.gradle and changing one line into this:
implementation 'com.google.android.gms:play-services-ads:19.8.0', before that the build was crashing.
My application now builds and doesnt give me ANY error message, however it closes directly after popping up and Im unable to do anything.
No error logs and nothing else beside that. Tried out several solutions which worked for people here, unluckily it didnt work for me.
same issue i faced with this plugin react-native-admob#next.
try this one https://github.com/react-native-admob/admob

Unable to resolve “expo-app-loading” from “App.js”

I am getting this error:
Failed building JavaScript bundle. Unable to resolve
“expo-app-loading” from “App.js”
when I ran my project after a couple of months. Earlier it was working fine but not now.
Can someone please help me out?
If you recently updated SDK versions (expo upgrade), please be sure to review the breaking changes carefully as is advised when you complete the install.
For instance, SDK-40 which was released in December has breaking changes notes about expo-app-loading that probably addresses what you're seeing perfectly.
Read this page : https://blog.expo.io/expo-sdk-40-is-now-available-d4d73e67da33
Look for section title: AppLoading has been extracted from the expo package
There were two problems:
expo-app-loading was not in my package.json, so I just installed it again and boom, it was in my packege.json then.
I was importing 'AppLoading' the wrong way. I wrote
import {AppLoading} from "expo-app-loading"; //wrong way
Which was breaking. Then I corrected it to
import AppLoading from "expo-app-loading"; //correct way
Which solved the issue.

java.lang.NullPointerException when dataBinding enabled = true

Whenever I enable this in my app gradle
dataBinding {
enabled = true
}
and then sync -> It completely succeed.
but when I "run" it, It builds fail and shows this error
java.lang.NullPointerException
at android.databinding.tool.store.LayoutFileParser.parseOriginalXml(LayoutFileParser.java:135)
at android.databinding.tool.store.LayoutFileParser.parseXml(LayoutFileParser.java:93)
...
my app has little amount of Kotlin code, and android version is 3.5, minSdkVersion 19, targetSdkVersion 28, and upgraded to androidX
How can I solve this? which part should I search for solve this problem???
except above code, every thing works perfect.
Edit
And when I rolled back my code before upgrading to androidX and compiled it, it also shows "Null point exception" and at this time, there are no extra message without just "Null point exception".
Finally I got answer. (cc. android databinding error:Execution failed for task ':app:dataBindingProcessLayoutsDebug')
I guessed it was because of BOM. Someone said it will happen when the code is used in two different circumstances(Window and Mac).
So in 'res' folder, I clicked 'remove BOM' button in android studio and that action changed some xml files.
<?xml version="1.0" encoding="utf-8"?>
But it wasn't worked in Mac. This solution worked only in Window.
I tried a little too much but I figured it out. I created the project on the Mac computer and it wasn't a problem when I switched to windows later. When I tried to create a new file, I got this error and just understood why. Every time I right-clicked on the file I just added, I saw an option called "remove BOM". Clicking this solved my problem. But I did not find the solution to the problem logically, I just found it random.
ex: https://prnt.sc/riw6ex

error with AIDE

In case of creation of the blank project in AIDE on a pad 4.2.2 of the basic code, AIDE finds an error:
This method must return the value of type"
Also QuickFix suggest to correct it by 'return 0' adding before a penultimate bracket that in turn attracts besides an error
A void method can't return a value
Also suggests to remove digit 0. Application is compiled, but not launched, referring to an error in application...Any ideas, why is it so? AIDE versions I tried the different.
I had the same error and when i reinstalled the app it worked. Also make sure you dont have a patched apk. I had that error with a pirate patched apk. I installed the original app with the premium key apk. XD Hope this helps you!

Android: Gradle Error in Android Studio

I recently added some .gifs to my /drawable so that I can use them with buttons. This worked fine (no errors). Now, when I go to rebuild/run my application, I get the following error:
Error: Gradle: Execution failed for task ':MyProject:mergeDebugResources'. > Index: 0
I'm not sure how to fix this (and there appears to be no other similar issues that I could find online.
Edit: Now it's the same error, but it also says (at the end of the first error)
Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed. See output
Okay, I fixed the issue. It was quite weird.
A) I had some capital letters in my res/drawables folder. Not too weird -- I can see how that would remove the first error.
B) Then, however, a lot of values in my main activity file became undefined. I had to manually import 'com.myapp.R'. Now that was weird.
Fortunately, everything is now working.
I hope that if anyone gets the same errors as me, that this response can help them.

Categories

Resources