jeduan / cordova-plugin-facebook4

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
765 stars 510 forks source link

minSdkVersion Breaking #799

Closed eeerrrttty closed 5 years ago

eeerrrttty commented 5 years ago

I'm trying to add the cordova-plugin-facebook4 plugin on my app, everything works, but after i install the plugin, the build crashes.

I thought on changing the minSdkVersion of plugin to 19 on plugin.xml, but it doesn't work. Everything worked before i added the plugin.

Task :app:processReleaseManifest FAILED

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

/home/usuario/kmais-app/src-cordova/platforms/android/app/src/main/AndroidManifest.xml:14:5-74 Error: uses-sdk:minSdkVersion 15 cannot be smaller than version 19 declared in library [:CordovaLib] /home/usuario/kmais-app/src-cordova/platforms/android/CordovaLib/build/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 15 Suggestion: use a compatible library with a minSdk of at most 15, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:processReleaseManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 19 declared in library [:CordovaLib] /home/usuario/kmais-app/src-cordova/platforms/android/CordovaLib/build/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 15 Suggestion: use a compatible library with a minSdk of at most 15, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

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 1m 49s 28 actionable tasks: 26 executed, 2 up-to-date /home/usuario/kmais-app/src-cordova/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: /home/usuario/kmais-app/src-cordova/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /home/usuario/kmais-app/src-cordova/platforms/android/app/src/main/AndroidManifest.xml:14:5-74 Error: uses-sdk:minSdkVersion 15 cannot be smaller than version 19 declared in library [:CordovaLib] /home/usuario/kmais-app/src-cordova/platforms/android/CordovaLib/build/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 15 Suggestion: use a compatible library with a minSdk of at most 15, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:processReleaseManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 19 declared in library [:CordovaLib] /home/usuario/kmais-app/src-cordova/platforms/android/CordovaLib/build/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 15 Suggestion: use a compatible library with a minSdk of at most 15, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

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 1m 49s

app:spawn Command "cordova" failed with exit code: 1 +0ms app:cordova-conf ⚠️ [FAIL] Cordova CLI has failed +1ms

How can i solve this? Is there a fork of this plugin that runs from version 19+ ?

My plugins does use minSdkVersion 19

eeerrrttty commented 5 years ago

package.json :

{
  "name": "com.herot.eyes",
  "displayName": "Herot",
  "version": "1.2.0",
  "description": "A sample Apache Cordova application that responds to the deviceready event.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [
    "ecosystem:cordova"
  ],
  "author": "Apache Cordova Team",
  "license": "Apache-2.0",
  "dependencies": {
    "cordova-android": "^8.0.0",
    "cordova-plugin-androidx": "^1.0.2",
    "cordova-plugin-androidx-adapter": "^1.1.0",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-facebook4": "6.0.0",
    "cordova-plugin-firebasex": "^6.0.7",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^4.1.0",
    "cordova-plugin-splashscreen": "^5.0.3"
  },
  "devDependencies": {
    "cordova-plugin-whitelist": "^1.3.4"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-firebasex": {
        "ANDROID_ICON_ACCENT": "#F5AB19"
      },
      "cordova-plugin-camera": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-plugin-facebook4": {
        "APP_ID": "2289635827752462",
        "APP_NAME": "Kmais",
        "FACEBOOK_HYBRID_APP_EVENTS": "false",
        "FACEBOOK_ANDROID_SDK_VERSION": "5.2.0"
      }
    },
    "platforms": [
      "android"
    ]
  }
}
peterpeterparker commented 5 years ago

For support requests plz use other channels.

That being said, try to set a different android-minSdkVersion and if necessary android-targetSdkVersion in your config.xml.