Ionic 4 android platform build failed - ionic4

Im trying to run my app on device but its showing error of
* What went wrong:
Execution failed for task ':app:fabricGenerateResourcesDebug'.
This error is showing when im using firebase native plugin.

You need to be read this Documentation no longer need ionic plugin.
https://github.com/angular/angularfire2
Install npm page and use this without plugin install.

Possible duplicate of:https://stackoverflow.com/a/49548906/10585097
Solution mentioned :Replace com.android.support:support-v4:+ with com.android.support:support-v4:27.1.0 in project.properties file under platform/android folder

Related

Error when trying to build a React Native application with EAS

I'm trying to build a React Native application using Expo and rnmapbox/maps module, which includes some custom native code.
Up until now, I could build the application without any problems, for Android at least, which is my target platform. But suddenly, it stopped working and the following error log is displayed:
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin class 'org.gradle.api.plugins.BasePlugin'.
> Could not find method maven() for arguments [build_1quotit9ccucu377qnhf7kv5h$_run_closure1$_closure3$_closure5#4a87f9f7] on configuration ':app:archives' of type org.gradle.api.in
ternal.artifacts.configurations.DefaultConfiguration.
What is the problem and how can I possibly fix it?
The problem appears to be with Mapbox. We are experiencing the same error as you on our Android builds under eas build. We just removed the rnmapbox/maps dependency and commented out all the relevant code and our builds are passing.
I added the "image": "latest" field to eas.json configuration and it seemed to fix the problem.
Apparently, there was a bug with older versions.

Failed to intall the app in react native, how can I fix this?

I was trying execute myapp to android but an error occurred.
To clarify what happened, first time I install nodejs and Android Studio.
Later I used the following commands:
npx react-native init 'app'
cd app
npx react-native run-android
Its my fisrt time messing with react native, I was following this page:
https://learn.microsoft.com/pt-br/windows/dev-environment/javascript/react-native-for-android
And the error is:
The error
I want coding in real time for android app.
How can I fix this?
Looks like the terminal output gives you several steps to do/check.
Make sure you have properly set up your android environment. Use this link to do so. You can use Expo-Cli or React-Native-Cli.
SDK location not found. This could be an off-shoot error of not properly doing step 1. However, to cover all of your bases, ensure you have properly set up your Android Emulator. This doc is a great walkthrough.
Once your Android studio and AVD Manager is properly set up, and your development environment is properly set, you should have no issues!
Please let me know if doing the above to steps did or did not solve your errors.
If you follow the steps, https://reactnative.dev/docs/environment-setup and https://developer.android.com/studio/run/emulator there will be no problem.
As a React Native fan on Windows 10, I'd like to mention just few points you need to check.
First, please check following user variables in Environment Variables ( You can see it from System Properties).
adb="C:\Users{username}\AppData\Local\Android\Sdk\platform-tools"
ANDROID_HOME="C:\Users{username}\AppData\Local\Android\Sdk"
JAVA_HOME="C:\Program Files\OpenJDK\openjdk-11.0.15_10"
Path: check if contains {ANDROID_HOME}\platform-tools
Eg:"C:\Users{username}\AppData\Local\Android\Sdk\platform-tools"
Second, if you are using Android Sdk emulator, please make sure that it configured correctly in emulator list in Android Studio.
For an instance, I created a android emulator using android sdk-29 and you can check the followings.
Third, I recommend you, deploy first app on emulator in Android Studio.
Because we need to download gradle zip file and others, it's essential to run your first android app in Android Studio.
When you confirmed your first android app(Deploy empty project app is also okay), you can run your React Native App by Expo-cli or react-native-cli.

React-Navigation and installation error and first-usage

I am new to react-native or you can say new to React and I am working on react-native navigation I have installed all the required libraries as instructed in https://reactnavigation.org/docs/getting-started but when I am running my code it is giving an error as '#react-navigation/native could not be found within the project or in this directories.' What should I do is there any way to get started with my code? Help me
If you have installed your app following the react native cli guide you might want to try running
gradle clean
in your android folder und then try to run your app in the emulator again.
On my first steps with react native I stumpled upon the same issue. :-)

'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary

This is my Code which is showing this error . Here I am trying to make a Drawer-navigation
This is the error showing , I am doing this in react-native.
It seems you might have missed some installation / setup steps for react-navigation.
Please check this section in the docs: https://reactnavigation.org/docs/getting-started#installing-dependencies-into-a-bare-react-native-project
If you have already installed the packages listed there (notably react-native-reanimated), perhaps you have not installed the native dependencies. This is important on iOS - run npx pod-install in your project root, and then build the app again (hot reload will not be enough).

React Native FCM not working

I am using this package https://github.com/evollu/react-native-fcm
I complete the installation process. The project is working. But every time I turn it on project. I am working ./gradlew clean on console. Other than that, I get the following error when I run
You can delete build folder, and recompile project again.