4 Replies Latest reply on Apr 25, 2017 12:35 PM by kerrishotts

    Build App for KitKat Tablet

    keziakoko2

      Hi

       

      I have made a phonegap app which works on all other devices except my tablet which runs KitKat (the app installs but displays a white screen instead of the content). I checked to see if this was an issue with it being a tablet but it seems to be the android version as the exact same app build works on another tablet running android lollipop...

       

      This is the code in my config file, is there something else I need to add or something I should remove so that it will run correctly on the KitKat tablet?

       

      <?xml version='1.0' encoding='utf-8'?>
      <widget id="com.phonegap.helloworld"
         version="1.0.0"
         xmlns = "http://www.w3.org/ns/widgets"
         xmlns:gap = "http://phonegap.com/ns/1.0"
         xmlns:android = "http://schemas.android.com/apk/res/android">


        <config-file platform="android" parent="/manifest" mode="merge">
             <supports-screens
                   android:xlargeScreens="true"
                   android:largeScreens="true"
                   android:smallScreens="true"
                   android:requiresSmallestWidthDp="600"

                />
             <uses-sdk android:minSdkVersion="19"
              android:targetSdkVersion="19"/>
        </config-file>


        <name>My App</name>
        <description>
         Tablet App.

         </description>

       

        <content src="index.html"/>
        <preference name="target-device" value="universal" />
        <preference name="android-minSdkVersion" value="19" />
        <preference name="android-targetSdkVersion" value="19"/>
        <preference name="orientation" value="landscape" />
        <access origin="*"/>
      </widget>

       

       

      I am not using an plugins.

       

      Thanks in advance

        • 1. Re: Build App for KitKat Tablet
          ryanskihead Adobe Employee

          Thats a fairly old version of Android -- you might need to build with an older version of phonegap. A quick goole suggests that official Kitkat support was released with 3.3.0, so maybe try somewhere in the 3.3.0 - 3.7.0 range (here's the list of supported versions on PGB).

           

          Might also be useful to use adb logcat to see what errors are being logged.

          1 person found this helpful
          • 2. Re: Build App for KitKat Tablet
            keziakoko2 Level 1

            Thank you for your reply!

             

            If i build with a lower cli i still get the same results....

             

            when running adb logcat *:E I get these errors amongst others, these seemed the most meaningful and it appears they occur in dev/log/main

             

            E/Parcel  (  588): Class not found when unmarshalling: com.android.packageinstaller.InstallFlowAnalytics

            E/Parcel  (  588): java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics

            E/Parcel  (  588):      at java.lang.Class.classForName(Native Method)

            E/Parcel  (  588):      at java.lang.Class.forName(Class.java:251)

            E/Parcel  (  588):      at java.lang.Class.forName(Class.java:216)

            E/Parcel  (  588):      at android.os.Parcel.readParcelableCreator(Parcel.java:2140)

            E/Parcel  (  588):      at android.os.Parcel.readParcelable(Parcel.java:2104)

            E/Parcel  (  588):      at android.os.Parcel.readValue(Parcel.java:2020)

            E/Parcel  (  588):      at android.os.Parcel.readArrayMapInternal(Parcel.java:2321)

            E/Parcel  (  588):      at android.os.Bundle.unparcel(Bundle.java:249)

            E/Parcel  (  588):      at android.os.Bundle.getString(Bundle.java:1118)

            E/Parcel  (  588):      at android.content.Intent.getStringExtra(Intent.java:5046)

             

            E/[0]UMC:Utils( 7678): Admin not found in package com.samsung.knoxpb.mdm

            E/[0]UMC:Utils( 7678): Admin not found in package com.sec.enterprise.knox.cloudmdm.smdms.agent.myknox

             

            E/EdmStorageProvider(  588): Admin not in database, something went wrong

            E/Finsky  (18786): [1] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}

            E/NetworkScheduler.SR(18419): Invalid parameter app

             

            E/AndroidProtocolHandler(19836): Unable to open asset URL: file:///android_asset/www/cordova_plugins.js

             

             

            I keep on seeing errors about admin not in database, as well as invalid parameter app, and unable to open cordove_plugins.js file.... however I am not using any plugins and my plugins folder is empty.

             

            I'm fairly new to phonegap and this is my first time using adb logcat, do you by any chance see anything that could be the issue?

             

            Once again thanks.

            • 3. Re: Build App for KitKat Tablet
              keziakoko2 Level 1

              I managed to get the google chrome remote debugger working and it was an error in my code: I had used let instead of var and KitKat does not recognize let. I changed all my let declarations to var and now it works perfectly.

              • 4. Re: Build App for KitKat Tablet
                kerrishotts Adobe Community Professional

                You can use a transpiler if you want to support ES2015+ code. I've used Babel and Typescript with good results.

                1 person found this helpful