5 Replies Latest reply on Aug 27, 2016 6:04 AM by VectorP

    Adding minSdkVersion breaks my build with undescriptive error :(

    elib91665461 Level 1



      My app is using the Facebook SDK plugin, which requires at least version 15. My app builds fine without Facebook SDK plugin, but once I enable it, I need to add minSdkVerison. So I do so like this:


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


      And then I get the following error:


      "Oh geez. Your build failed. Sorry, but a problem occurred on the build server"



      With a button that says "notify us". I pressed it two days ago but nothing is happening. I need help, this is blocking my release


      The problem isn't intermittent. It fails 100% of the time with this property set, and 0% of the time without it, but I need minSdkVersion for the FB plugin.

        • 1. Re: Adding minSdkVersion breaks my build with undescriptive error :(
          VectorP Level 4

          I think the minSDK is specified correctly, and it's not causing the problem. Rather, it's the FB plugin itself, or something else in your config.


          1. What does the build log say?

          2. If that doesn't lead to a solution, could you please post your full config?

          • 2. Re: Adding minSdkVersion breaks my build with undescriptive error :(
            elib91665461 Level 1

            Thanks for the quick response. Here's the error, I wasn't able to get much from it:


            * What went wrong:

            Execution failed for task ':processDebugResources'.

            > com.android.ide.common.internal.LoggedErrorException: Failed to run command:

              /android-sdk/build-tools/24.0.1/aapt package -f --no-crunch -I /android-sdk/platforms/android-22/android.jar -M /project/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /project/build/intermediates/res/debug -A /project/build/intermediates/assets/debug -m -J /project/build/generated/source/r/debug -F /project/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package <package> -0 apk --output-text-symbols /project/build/intermediates/symbols/debug

              Error Code:



              Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

              Failed to generate resource table for split ''

              /project/build/intermediates/res/debug/values-v23/values.xml:6: error: Error: No resource found that matches the given name (at 'cardBackgroundColor' with value '?android:attr/colorBackgroundFloating').




            * Try:

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


            BUILD FAILED


            Total time: 6.776 secs



              throw e;


            Error code 1 for command: /project/gradlew with args: cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=fa lse



            And here's my manifest:


            <?xml version='1.0' encoding='utf-8'?>

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





                <author email="<email>" href="<website>">



                <content src="index.html" />

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

                <preference name="SplashScreenDelay" value="1900" />

                <preference name="FadeSplashScreenDuration" value="900" />

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

                <preference name="SplashScreenBackgroundColor" value="#e4c519" />

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

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

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

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

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

                <preference name="android-installLocation" value="auto" />

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

                <preference name="AndroidLaunchMode" value="singleTop"/>

                <plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />

                <plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1" />

                <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" />

                <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" />

                <plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />

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

                <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />

                <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />

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

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

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

                <plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" />

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

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

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

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

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

                <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />

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

                <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

                <icon src="icon.png" />

                <splash src="icon.png" />

                <platform name="ios">

                    <preference name="orientation" value="portrait" />

                    <icon height="57" platform="ios" src="res/icon/ios/icon.png" width="57" />

                    <icon height="114" platform="ios" src="res/icon/ios/icon@2x.png" width="114" />

                    <icon height="40" platform="ios" src="res/icon/ios/icon-40.png" width="40" />

                    <icon height="80" platform="ios" src="res/icon/ios/icon-40@2x.png" width="80" />

                    <icon height="50" platform="ios" src="res/icon/ios/icon-50.png" width="50" />

                    <icon height="100" platform="ios" src="res/icon/ios/icon-50@2x.png" width="100" />

                    <icon height="60" platform="ios" src="res/icon/ios/icon-60.png" width="60" />

                    <icon height="120" platform="ios" src="res/icon/ios/icon-60@2x.png" width="120" />

                    <icon height="180" platform="ios" src="res/icon/ios/icon-60@3x.png" width="180" />

                    <icon height="72" platform="ios" src="res/icon/ios/icon-72.png" width="72" />

                    <icon height="144" platform="ios" src="res/icon/ios/icon-72@2x.png" width="144" />

                    <icon height="76" platform="ios" src="res/icon/ios/icon-76.png" width="76" />

                    <icon height="152" platform="ios" src="res/icon/ios/icon-76@2x.png" width="152" />

                    <icon height="29" platform="ios" src="res/icon/ios/icon-small.png" width="29" />

                    <icon height="58" platform="ios" src="res/icon/ios/icon-small@2x.png" width="58" />

                    <icon height="87" platform="ios" src="res/icon/ios/icon-small@3x.png" width="87" />

                    <splash height="480" platform="ios" src="res/screen/ios/Default.png" width="320" />

                    <splash height="960" platform="ios" src="res/screen/ios/Default@2x.png" width="640" />

                    <splash height="1136" platform="ios" src="res/screen/ios/Default-568h@2x.png" width="640" />

                    <splash height="1334" platform="ios" src="res/screen/ios/Default-667h@2x.png" width="750" />

                    <splash height="2208" platform="ios" src="res/screen/ios/Default-Portrait-736h@3x.png" width="1242" />

                    <splash height="1242" platform="ios" src="res/screen/ios/Default-Landscape-736h@3x.png" width="2208" />

                    <splash height="1024" platform="ios" src="res/screen/ios/Default-Portrait.png" width="768" />

                    <splash height="768" platform="ios" src="res/screen/ios/Default-Landscape.png" width="1024" />

                    <splash height="2048" platform="ios" src="res/screen/ios/Default-Portrait@2x.png" width="1536" />

                    <splash height="1536" platform="ios" src="res/screen/ios/Default-Landscape@2x.png" width="2048" />


                <platform name="android">

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

                    <preference name="orientation" value="portrait" />

                    <allow-intent href="itms:*" />

                    <allow-intent href="itms-apps:*" />

                    <splash src="res/screen/android/screen-ldpi-portrait.png"       platform="android" qualifier="port-ldpi" />

                    <splash src="res/screen/android/screen-mdpi-portrait.png"       platform="android" qualifier="port-mdpi" />

                    <splash src="res/screen/android/screen-hdpi-portrait.png"       platform="android" qualifier="port-hdpi" />

                    <splash src="res/screen/android/screen-xhdpi-portrait.png"      platform="android" qualifier="port-xhdpi" />

                    <splash src="res/screen/android/screen-xxhdpi-portrait.png"     platform="android" qualifier="port-xxhdpi" />

                    <splash src="res/screen/android/screen-xxxhdpi-portrait.png"     platform="android" qualifier="port-xxxhdpi" />


                <access origin="*" />

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

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

                <allow-intent href="tel:*" />

                <allow-intent href="sms:*" />

                <allow-intent href="mailto:*" />

                <allow-intent href="geo:*" />

                <plugin name="cordova-plugin-keyboard" spec="~1.1.4" />

                <plugin name="cordova-plugin-socialsharing" spec="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" />

                <plugin name="cordova-plugin-facebook4" spec="~1.7.0">

                    <param name="APP_ID" value="<value>" />

                    <param name="APP_NAME" value="<name>" />


                <plugin name="phonegap-plugin-push" source="npm" spec="~1.4.5">

                    <variable name="SENDER_ID" value="<value>" />


                <plugin name="cordova-plugin-nativeaudio" spec="~3.0.7" />


            • 3. Re: Adding minSdkVersion breaks my build with undescriptive error :(
              elib91665461 Level 1

              Looks like this may be an issue with the FB plugin actually. I'll update once I know for sure:


              Build Error · Issue #295 · jeduan/cordova-plugin-facebook4 · GitHub

              • 4. Re: Adding minSdkVersion breaks my build with undescriptive error :(
                VectorP Level 4

                Just a couple of small things I notice, might be unrelated:


                1. You have specified both minSdkVersion-14 and -15. You may want to delete the former.

                2. You have <preference name="phonegap-version" value="cli-5.2.0" />. Wouldn't you rather use the latest version?

                3. You have a bunch of plugins included. Do you really need them all? If not, delete the ones you don't need.

                4. Of the others, you have pinned an older version. Is there any reason to do so?

                5. For iOS, you have <preference name="orientation" value="portrait" />. Yet, you include four landscape splashes

                6. For the Facebook4 plugin, a new relase is available, too: 1.7.2 instead of your 1.7.0