After setting up admob my app crashes without error - android

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

Related

(Build failed 'Xcodes output') The getter 'onChanged00' isn't defined for the class 'OTPTextField

I haven't worked on my app for 2 days and all of a sudden, when running the app, I get this error:
debug console
I haven't touched the code and it was working fine 2 days ago.
The links in the error...
otp_field file
otp_field file
...point to the otp_field.dart file(which I never opened), with the error being The getter 'onChanged00' isn't defined for the class 'OTPTextField'.
I'm not sure how this happened and can't seem to solve this. I updated the otp_field entry in the pubspec.yaml file, but this did not work either.
pubspec.yaml file
(This also happens when I run using the android emulator)
What am I missing here? Would be great if you could point me in the right direction. Thanks in advance.

ReferenceError: Can't find variable: _UIManager

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 }],

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

Android Facebook Account Kit Crash - missing metadata: /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN

I am suddenly getting a number of crash reports around this the past few weeks. The crashes indicated missing metadata for certain country code. Most of them have been one of:
PhoneNumberMetadataProto_CN
PhoneNumberMetadataProto_BR
PhoneNumberMetadataProto_IR
The crashes seems to have occurred out of nowhere. I attempted to upgrade the AccountKit version from 4.28.0 to 4.31.0. This resulted in a moving where the crash occurred from com.facebook.accountkit.internal.Utility.parseNumber to com.facebook.accountkit.ui.PhoneNumberTextWatcher.getFormattedNumber but the crash is still occurring.
My next plan of attack is to try including the com.googlecode.libphonenumber dependency directly via Gradle instead of letting it just get included transitively from the AccountKit SDK, but I'm not holding my breath that it will fix the problem. Any other ideas are much appreciated.
I am having same problem here.
i am endup with adding dependency in gradle (like your next plan). Its working fine.
dependencies {
...
compile 'com.googlecode.libphonenumber:libphonenumber:8.+'
}

Activity class does not exist

Aaaargh! I don't know what's going on, but suddenly I can't launch my app. I'm using IntelliJ and I keep getting this error. I thought maybe there was a typo somewhere in the manifest, but there doesn't seem to be. Heres' the error:
Launching application: com.foo.app/com.foo.app.main.
DEVICE SHELL COMMAND: am start -n "com.foo.app/com.foo.app.main"
Starting: Intent { cmp=com.foo.app/.main}
Error type 3
Error: Activity class {com.foo.app/com.foo.app.main} does not exist.
And here's my Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.foo.app">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".main">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".NoBellsActivity"/>
</application>
</manifest>
And the strange thing is that ADB shows me that the ActivityManager is starting the intent just fine...
The problem is in the build / run configuration of your project.
You have to check the "Deploy application" checkbox in the Run/Debug Configuration screen, under the General tab.
This solved my problem.
I had a very similar error.
In my case the application was not completely removed from the Android phone.
I simply removed it using ADB, e.g. adb unsinstall com.your_app_name
Check if you don't have another application with the same package id installed on device: https://stackoverflow.com/a/22524188/540639
after checking all other things that people stated in their post, check in the IDEA:
Run -> Edit Configurations -> Android Application -> Launch the activity that you want to start on launch of your application should be there...
I have tried every suggestion i found, but couldnt solve the issue.
After that i figured it out myself:
The problem in my case was that i renamed the package.
To make sure you dont get the error above, add the
defaultConfig {
applicationId "com.yourpackage.yourapplication"
}
to your build.gradle file.
Hope that helps.
I had a problem with identical symptoms and following solved it in my case.
If you're not already, use LogCat window to get more precise information about the exception than console offers.
If you haven't already, check through your layout XML files in case you have a custom object and you're using the wrong path for a resource.
If you haven't already, or you have to address the above, try cleaning your project and then building again.
Rebuild the application and run it.
This solved my problem.
I found an extra <application> </application> tag in my manifest, I don't know how it got there but removing it fixed my issue.
I get this all the time in intellij.
It looks like you are missing the line that states what your default package is e.g. Com.foo. Something is wrong with your manifest there...try creating a new blank test project and compare what you are missing because that looks like it is too short.
Also double check the package and activity name. I got a similar error caused by a missing dot in front of the activity name (e.g. "package.Activity" instead of ".package.Activity" ). IntelliJ didn't mark it as wrong so it was easily overlooked.
Similar to Joff's answer. It seems in Lollipop, when you try to uninstall an application, it doesn't uninstall for all users (although I only have one user).
I just go to the Apps section in Settings, select the application and use the menu and "Uninstall for all users".
I'd had the same problem, after closed Genymotion emulator and connected my phone. Cleaning the project and rerunning solved my problem too.
I had the same issue reported here. I recently added a third activity to my application and it was failing to launch with the same error. To fix the issue, I used a detail posted here. Another developer said that introducing an error to their AndroidManifest.xml file corrected their issue. I did the same: I added a space to cause a compile error, built, got the error reported, corrected the error and then recompiled and deployed and IT WORK.
Hope it fixes your issue.
One Solution:
Just create a new project and copy your classes from the old project into the new project, run the new project and it will probably work, worked for me.
In Android Studio under Run->Edit Configurations check that the package name is correct in the Launch Activity box.
I had an issue with a capital letter in that box that wasn't in the package name.
It happened with me because I forget to add it in manifest file or misspell Class name
I tried many but the problem is confliction of the package. I just invalidated caches and restarted my Android studio and working well.
Hope this may help you!
Probably this answer is too late, but I have to share my experience.
I got this problem while I developed a multi-platform Xamarin app and I was getting:
Error type 3 Error: Activity class {com.companyname.Name/com.companyname.Name.MainActivity} does not exist.
I just solved this issue removing the tag: <category android:name="android.intent.category.LAUNCHER" /> and that's it, problem solved!
NOTE: I'm using a Splash Launcher and that was the reason of my problem, when I added the tag LAUNCHER on my MainActivity all the app crashed.
its as simple as just removing the . (dot) in front of your activitys name. Your main activity should not be dotted. Dots in front of the name means its an child of the main one.

Categories

Resources