3 Replies Latest reply on Aug 10, 2016 8:40 AM by Chris W. Griffith

    Icon does not appear on apk or Cordova class not found

    matthew.mclarty

      I can't seem to get the build.phonegap.com site to build my Android apk and use the icons specified in my config.xml file. I have tried several different paths for the default icon and none of them seem to work. I have confirmed, repeatedly, that every path is valid in every defined <icon> element. I have tried to use the ConfiGAP app to generate my config.xml but it produced a malformed .xml file so I will no longer be using it.

       

      I have followed the Cordova documentation as regards to how to customize icons found here: Customize app icons - Apache Cordova but the site does not appear to work when using these conventions. (?)

       

      The odd part is that, when I build the app using the CLI on my local machine, the app icon appears correctly. The problem there is that the app does not run correctly and throws an error "[ERROR] Error initializing Cordova: Class not found”. So it seems like my config.xml is somehow correct locally but not when used by the build.phonegap.com website.

       

      Regardless, something isn't quite right, and from what I've read, both the icon issue, and the specific error I get when the icon is correct are somehow related to something being wrong in the config.xml

       

      What am I doing wrong? Any advice/thoughts/ridicule/statements about how I missed something obvious/etc would be appreciated.

       

      Here is my config.xml (minus identifying info):

       

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

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

          <name>XXX</name>

          <description>

              XXXX

          </description>

          <author email="xxx@xxx.com" href="http://www.xxx.com">

              XXX

          </author>

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

          <preference name="permissions" value="none" />

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

          <preference name="target-device" value="universal" />

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

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

          <preference name="prerendered-icon" value="true" />

          <preference name="stay-in-webview" value="false" />

          <preference name="ios-statusbarstyle" value="black-opaque" />

          <preference name="detect-data-types" value="true" />

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

          <preference name="exit-on-suspend" value="false" />

          <preference name="show-splash-screen-spinner" value="true" />

          <preference name="auto-hide-splash-screen" value="true" />

          <preference name="disable-cursor" value="false" />

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

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

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

          <preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external" />

          <preference name="phonegap-version" value="3.7.0" />

          <gap:plugin name="ch.ti8m.documenthandler" version="0.2.1" />

          <gap:plugin name="org.apache.cordova.console" version="0.2.7" />

          <gap:plugin name="io.github.pwlin.cordova.plugins.fileopener" version="1.0.1" />

          <gap:plugin name="org.apache.cordova.device" />

          <gap:plugin name="org.apache.cordova.file" />

          <gap:plugin name="org.apache.cordova.inappbrowser" version="0.4.0" />

          <icon src="icon.png" gap:role="default" />  

          <platform name="android">

              <icon density="ldpi" src="res/icon/android/36.png" />

              <icon density="mdpi" src="res/icon/android/48.png" />

              <icon density="hdpi" src="res/icon/android/72.png" />

              <icon density="xhdpi" src="res/icon/android/96.png" />

          </platform>

          <platform name="ios">

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

              <icon gap:platform="ios" height="72" src="res/icon/ios/72x72.png" width="72" />

              <icon gap:platform="ios" height="76" src="res/icon/ios/76x76.png" width="76" />

              <icon gap:platform="ios" height="114" src="res/icon/ios/114x114.png" width="114" />

              <icon gap:platform="ios" height="120" src="res/icon/ios/120x120.png" width="120" />

              <icon gap:platform="ios" height="144" src="res/icon/ios/114x144.png" width="144" />

              <icon gap:platform="ios" height="152" src="res/icon/ios/152x152.png" width="152" />

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

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

              <gap:splash gap:platform="ios" height="1024" src="res/screen/ios/ipad-portrait.png" width="768" />

              <gap:splash gap:platform="ios" height="768" src="res/screen/ios/ipad-landscape.png" width="1024" />

              <gap:splash gap:platform="ios" height="1136" src="res/screen/ios/iphone-568.png" width="640" />

          </platform>

          <access origin="http://127.0.0.1*" />

          <access origin="https://mail1.xxx.com:xxx*" />

          <access origin="https://im.xxx.com:xxx*" />

          <access origin="https://im.xxx.com:xxx*" />

          <access origin="*" />

      </widget>

      https://forum.ionicframework.com/t/erroe-error-initializing-cordova-class-not-found-only-o n-android/3555

       

      Message was edited by: Matthew McLarty Removed double pasted error message from the bottom of the post.