Couple days ago I did a ionic platform remove android and ionic plaform add android in order to check my progress in a certain feature in my code, and after I tried that I no longer can build an apk.
That does not make any sense to me since I didn't change another thing.
First error I was receiving said:
:processDebugManifest/Users/larissaarruda/Documents/mycode/platforms/android/AndroidManifest.xml:22:18-86 Error:
Attribute application#appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-60:19 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processDebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : Attribute application#appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-60:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
I tried this solution cordova plugin add cordova-android-support-gradle-release --fetch but it did not help me, only changed error message to
/Users/larissaarruda/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0b39dfc9f8ccfbd308d18fae8fdbf5ed/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/larissaarruda/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0b39dfc9f8ccfbd308d18fae8fdbf5ed/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
/Users/larissaarruda/Documents/mycode/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:138: error: resource android:attr/fontVariationSettings not found.
/Users/larissaarruda/Documents/mycode/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:138: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Failed to execute aapt
I also tried cleaning gradle cache by removing .gradle/caches and after I tried build the app again, it came up with same error Failed to execute aapt.
Here's my $ ionic info output:
Your system information:
Cordova CLI: 7.0.1
Gulp version: CLI version 2.0.1
Gulp local: Local version 3.9.1
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.0
Ionic App Lib Version: 0.3.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X Yosemite
Node Version: v6.11.1
Xcode version: Not installed
Related
I am trying to use the react-native-call-detection library to get the incoming call number.
But when I start the android emulator this low error appears.
I have already run react-native unlink react-native-call-detection, but the error continues. Having identify the other mistakes but to no avail!
If I completely remove react-native-call-detection then the emulator opens without any error.
Can someone help me please?
Thanks.
Microsoft Windows [versão 10.0.18363.535]
(c) 2019 Microsoft Corporation. Todos os direitos reservados.
L:\wAPP\reactCall>react-native run-android
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-call-detection (to unlink run: "react-native unlink react-native-call-detection")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1645 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Task :app:processDebugManifest FAILED
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
21 actionable tasks: 3 executed, 18 up-to-date
L:\wAPP\reactCall\android\app\src\debug\AndroidManifest.xml:11:7-34 Error:
Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-call-detection] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-call-detection] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
L:\wAPP\reactCall\android\app\src\debug\AndroidManifest.xml:11:7-34 Error:
Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-call-detection] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-call-detection] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
at checkExecSyncError (child_process.js:610:11)
at execFileSync (child_process.js:628:15)
at runOnAllDevices (L:\wAPP\reactCall\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (L:\wAPP\reactCall\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at L:\wAPP\reactCall\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (L:\wAPP\reactCall\node_modules\#react-native-community\cli\build\index.js:164:9)
L:\wAPP\reactCall>
Try edit /android/app/main/AndroidManifest.xml in manifest tag at the top of the file add xmlns:tools="http://schemas.android.com/tools" before package name.
In application tag remove android:allowBackup="false" and add tools:replace="android:allowBackup"
And Don't forget require READ_PHONE_STATE permission by add <uses-permission android:name="android.permission.READ_PHONE_STATE" />
I am trying to run react native a project that was passed to me on android and is giving error
Already tried changing the gradle.properties file to use AndroidX but only gives another error, already tried changing the manifest file as the error fouls but also doesn't work
error image:
https://i.imgur.com/CUNHb7N.png
> Task :app:processDebugManifest FAILED
/home/leleuvilela/Workspace/waproject-base-app/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactopport-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreCompo
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run wi
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5s
132 actionable tasks: 122 executed, 10 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
You just need to add these two lines at the end of your {your app path}\android\gradle.properties file.
android.enableJetifier=true
android.useAndroidX=true
I want to show my rtmp stream in my react-native application but i can't do that. I tried 3-4 module and everyone gave me error. i can't even start my application.
i tried this firstly and i belive this module what i need but i can't use.
https://medium.com/#edisondevadoss/react-native-live-stream-rtmp-video-player-3db9d43c6137
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 875 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...
> Configure project :react-native-ksyvideo
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (25.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :app:processDebugManifest FAILED
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
20 actionable tasks: 2 executed, 18 up-to-date
C:\Users\AGAOGLU\reactnative\agd\android\app\src\debug\AndroidManifest.xml:11:7-34 Error:
Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-ksyvideo] AndroidManifest.xml:19:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-ksyvideo] AndroidManifest.xml:19:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\AGAOGLU\reactnative\agd\android\app\src\debug\AndroidManifest.xml:11:7-34 Error:
Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-ksyvideo] AndroidManifest.xml:19:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-ksyvideo] AndroidManifest.xml:19:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-117 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)
at runOnAllDevices (C:\Users\AGAOGLU\reactnative\agd\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\AGAOGLU\reactnative\agd\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (C:\Users\AGAOGLU\reactnative\agd\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
i don't know what i should understand this error.
while running react-native run-android I am getting below exception...
It was running fine and I made a git pull and did npm ci and after that, it is coming. There are no changes in the new pull also. In fact for after doing git colon that is also the same issue.
And it's running well in MAC.
Please help I am stuck.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:13:5-33:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5s
128 actionable tasks: 3 executed, 125 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
Thanks
I solved this
npm uninstall react-native-device-info
and then
npm install --save react-native-device-info
latest version should be 2.1.2
Add this to your app/build.gradle dependencies:
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-gcm:16.1.0'
force 'com.google.android.gms:play-services-base:16.1.0'
force 'com.google.firebase:firebase-core:16.0.9'
force 'com.google.firebase:firebase-messaging:18.0.0'
}
}
This basically forces your third party libraries(like deviceinfo) that depend on gcm, to use the 16.1.0 version.
I can no longer get my Android App to build after adding this library to my pubspec.yaml file.
https://pub.dartlang.org/packages/flutter_email_sender#-installing-tab-
I'm getting the following error:
/Users/duffette/AndroidStudioProjects/undaunted_golf_flutter/android/app/src/main/AndroidManifest.xml:22:18-86 Error:
Attribute application#appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:15:5-38:19 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:15:5-38:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at (help link)
BUILD FAILED in 8s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See (link) for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
I've already migrated my project to AndroidX.
I've made sure that compileSdkVersion 28 and targetSdkVersion 28.
I have successfully added other libraries added to my project.
I'm attempting to follow the instructions to add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:15:5-38:19 to override., but I haven't been successful.