9 Replies Latest reply on Jul 17, 2017 12:48 PM by kerrishotts

    Can't set min android sdk version in pgb using config.xml

    sanjeevs89568367

      I need the minimum android sdk version to be higher than 15 to enable the paypal plugin.


      I have tried to set it up using the following  tag in my config.xml file


      <preference name="android-minSdkVersion" value="17" />

       

      but I am getting error

       

       

      BUILD FAILED

       

      Total time: 5.663 secs

      Error: /project/gradlew: Command failed with exit code 1 Error output:

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      /project/AndroidManifest.xml:54:5-87 Error:

      uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.paypal.sdk:paypal-android-sdk:2.15.3] /project/build/intermediates/exploded-aar/com.paypal.sdk/paypal-android-sdk/2.15.3/Androi dManifest.xml

      Suggestion: use tools:overrideLibrary="com.paypal.android.sdk.payments" to force usage

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processReleaseManifest'.

      > Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.paypal.sdk:paypal-android-sdk:2.15.3] /project/build/intermediates/exploded-aar/com.paypal.sdk/paypal-android-sdk/2.15.3/Androi dManifest.xml

        Suggestion: use tools:overrideLibrary="com.paypal.android.sdk.payments" to force usage

       

      * Try:

      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

        at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

        at emitTwo (events.js:106:13)

        at ChildProcess.emit (events.js:191:7)

        at maybeClose (internal/child_process.js:877:16)

        at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

       

       

       

      Is anyone facing the same issue?
      It would be great if anyone can share their experience on this.

        • 1. Re: Can't set min android sdk version in pgb using config.xml
          vangroover Adobe Employee

          what did you set the "android-targetSdkVersion" as?

          • 2. Re: Can't set min android sdk version in pgb using config.xml
            sanjeevs89568367 Level 1

            <preference name="android-minSdkVersion" value="17" />

            • 3. Re: Can't set min android sdk version in pgb using config.xml
              sanjeevs89568367 Level 1

              In addition, I also upgraded my phonegap-plugin-barcodescanner plugin, as it was mentioned in one of the forum that the old version of this plugin was causing the problem.

               

              <plugin name="phonegap-plugin-barcodescanner" spec="6.0.6" source="npm" />

               

              But still, build is failing.

              • 4. Re: Can't set min android sdk version in pgb using config.xml
                vangroover Adobe Employee

                "android-targetSdkVersion" not "android-minSdkVersion" different preferences.

                • 5. Re: Can't set min android sdk version in pgb using config.xml
                  sanjeevs89568367 Level 1

                  I just tried by updating my config.xml file to

                   

                  <preference name="android-targetSdkVersion" value="16" />

                   

                  But still its failing.

                   

                   

                   

                  • 6. Re: Can't set min android sdk version in pgb using config.xml
                    kerrishotts Adobe Community Professional

                    Can you share your config.xml (minus private/secret information)?

                    • 7. Re: Can't set min android sdk version in pgb using config.xml
                      sanjeevs89568367 Level 1

                      Thank you for looking into this.

                       

                       

                       

                       

                      <?xml version="1.0" encoding="UTF-8" ?>

                      <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="" version="">

                          <preference name="phonegap-version" value="cli-6.5.0" />

                          <name>***</name>

                          <description>***</description>

                          <author href="" email=""></author>

                          <access origin="*" />

                          <feature name="http://api.phonegap.com/1.0/camera" />

                          <feature name="http://api.phonegap.com/1.0/file" />

                          <feature name="http://api.phonegap.com/1.0/network" />

                          <feature name="http://api.phonegap.com/1.0/notification" />

                          <feature name="http://api.phonegap.com/1.0/device" />

                          <gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.0.0" />

                          <allow-navigation href="http://*/*" />

                          <allow-navigation href="https://*/*" />

                          <allow-navigation href="data:*" />

                          <plugin name="phonegap-plugin-push" source="npm" version="1.8.3">

                              <param name="SENDER_ID" value="****" />

                          </plugin>

                          <plugin name="cordova-plugin-file" source="npm" />

                          <plugin name="cordova-plugin-file-transfer" source="npm" />

                          <plugin name="cordova-plugin-dialogs" source="npm" />

                          <plugin name="cordova-plugin-vibration" source="npm" />

                          <plugin name="cordova-plugin-splashscreen" source="npm" />

                          <plugin name="cordova-plugin-inappbrowser" source="npm" />

                          <plugin name="cordova-plugin-statusbar" source="npm" version="2.1.3" />

                          <plugin name="cordova-plugin-x-toast" source="npm" />

                          <plugin name="cordova-plugin-device" source="npm" />

                          <plugin name="cordova-plugin-media" source="npm" />

                          <plugin name="cordova-plugin-network-information" source="npm" />

                          <plugin name="cordova-plugin-secure-storage" spec="2.4.1" source="npm" />

                          <preference name="Fullscreen" value="false" />

                          <preference name="StatusBarOverlaysWebView" value="true" />

                          <preference name="StatusBarBackgroundColor" value="#000000" />

                          <feature name="StatusBar">

                              <param name="ios-package" onload="false" value="CDVStatusBar" />

                          </feature>

                          <preference name="StatusBarStyle" value="lightcontent" />

                          <preference name="android-windowSoftInputMode" value="stateVisible|adjustResize" />

                          <preference name="KeyboardDisplayRequiresUserAction" value="false" />

                          <preference name="xwalkVersion" value="19+" />

                          <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />

                          <preference name="xwalkMode" value="embedded" />

                          <preference name="xwalkMultipleApk" value="true" />

                          <preference name="AndroidPersistentFileLocation" value="Compatibility" />

                          <preference name="android-build-tool" value="gradle" />

                          <platform name="ios">

                              <preference name="KeychainAccessibility" value="WhenUnlocked" />

                          </platform>

                          <preference name="ShowSplashScreenSpinner" value="false" />

                          <plugin name="ionic-plugin-keyboard" source="npm" version="2.2.0" />

                          <plugin name="cordova-plugin-inappbrowser" source="npm" spec="1.6.1" />

                          <plugin name="cordova-plugin-image-resizer" source="npm" spec="1.0.0" />

                          <plugin name="cordova-plugin-globalization" source="npm" spec="1.0.5" />

                          <plugin name="cordova-plugin-media-capture" source="npm">

                              <variable name="MICROPHONE_USAGE_DESCRIPTION" value="***" />

                          </plugin>

                          <plugin name="cordova-plugin-camera" source="npm">

                              <variable name="CAMERA_USAGE_DESCRIPTION" value="***" />

                              <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="***" />

                          </plugin>

                          <plugin name="phonegap-plugin-barcodescanner" spec="6.0.2" source="npm">

                              <variable name="CAMERA_USAGE_DESCRIPTION" value="***" />

                          </plugin>

                          <plugin name="com.paypal.cordova.mobilesdk" source="npm" spec="3.4.0" />

                          <plugin name="cordova-plugin-app-version" source="npm" spec="0.1.9" />

                          <preference name="android-minSdkVersion" value="16" />

                      </widget>

                      • 8. Re: Can't set min android sdk version in pgb using config.xml
                        faustot4544220

                        kerrishotts

                         

                        Any solution ? Got a similar error

                         

                        Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 18 declared in library [com.github.ergovia-mobile:android-transcoder:v0.1.10R_ergovia] /Users/fausto/Projects/coding/4linked-mobile/club-sencha/phonegap/platforms/android/build /intermediates/exploded-aar/com.github.ergovia-mobile/android-transcoder/v0.1.10R_ergovia/ AndroidManifest.xml

                        added to manifest

                        <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />

                        but not working ! the same with crosswalk.

                        • 9. Re: Can't set min android sdk version in pgb using config.xml
                          kerrishotts Adobe Community Professional

                          See Config.xml - Apache Cordova; specifically the "android-minSdkVersion" preference.

                           

                          Also, be more specific as to which plugin you're using. I've googled for the name, but I'm only finding a pure Java implementation, not a Cordova plugin.