@werdna521dev wrote:
Hi, I’ve just upgraded my @capacitor/core, @capacitor/android, and @capacitor/ios to “2.0.2” and the problem starts to emerge. My application is building fine before these upgrades that I made. Here’s the full error message that I get from Android Studio:
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.2.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-44: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 6s 34 actionable tasks: 3 executed, 31 up-to-date
I even get a suggestion from the Android Studio but unfortunately, it still won’t build. This is what it suggests:
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.2.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-44:19 to override.
And here’s my full package.json file:
{ "name": "THIS IS MY APPLICATION NAME", "version": "0.0.1", "private": true, "dependencies": { "@capacitor/android": "^2.0.2", "@capacitor/core": "2.0.2", "@capacitor/ios": "^2.0.2", "@ionic-native/core": "^5.19.0", "@ionic-native/http": "^5.19.0", "@ionic-native/image-picker": "^5.19.1", "@ionic-native/in-app-browser": "^5.19.0", "@ionic-native/in-app-purchase": "^5.23.0", "@ionic-native/screen-orientation": "^5.20.0", "@ionic/react": "^4.11.10", "@ionic/react-router": "^4.11.7", "@types/jest": "^24.0.18", "@types/node": "^12.7.12", "@types/react": "^16.9.5", "@types/react-dom": "^16.9.1", "@types/react-router": "^5.1.1", "@types/react-router-dom": "^5.1.0", "chart.js": "^2.9.3", "cordova-plugin-advanced-http": "^2.3.1", "cordova-plugin-file": "^6.0.2", "cordova-plugin-inappbrowser": "^3.1.0", "cordova-plugin-inapppurchase": "^1.2.0", "cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-telerik-imagepicker": "^2.3.3", "es6-promise-plugin": "^4.2.2", "ionic-native": "^2.9.0", "react": "^16.10.2", "react-chartjs-2": "^2.8.0", "react-click-n-hold": "^1.0.7", "react-dom": "^16.10.2", "react-router": "^5.1.0", "react-router-dom": "^5.1.0", "react-shimmer": "^2.0.1", "react-zoom-pan-pinch": "^1.6.1", "typescript": "3.6.3" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "description": "An Ionic project", "devDependencies": { "@capacitor/cli": "1.3.0", "react-scripts": "^3.4.0" } }
I decided to upgrade my capacitor as I was not able to use capacitor’s push notification plugin (the function requestPermission() is undefined). I searched up the forum and found out that the docs are for capacitor 2.0.0 up. I’m currently stuck and can’t find any working solutions throughout the forums, so hopefully someone knows something that could help. Thanks.
Edit: Oh, I forgot to say that I’m using React instead of Angular. Thanks again
Posts: 3
Participants: 2