• Richard Evans 9
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I have followed the steps on how to setup and install a hybrid local application on android from the 'Mobile SDK Development Guide - Salesforce Mobile SDK 3.0' documentation. However I keep hitting the same error.

After importing the relavant projects into Eclipse, as stated by in the forcedroid output, there are 115 errors. I noticed the cordova reference was invalid in the SalesforceSDK project, pointing to '..\..\external\cordova\framework'. I change this to point to the CordovaApp-CordovaLib project in Eclipse, and after rebuilding the errors were gone.

However whenever I run the application I then get the following error:
 
12-14 22:42:34.313: E/AndroidRuntime(17385): FATAL EXCEPTION: main
12-14 22:42:34.313: E/AndroidRuntime(17385): Process: com.testapp.mytestapp, PID: 17385
12-14 22:42:34.313: E/AndroidRuntime(17385): java.lang.RuntimeException: Unable to instantiate application com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.access$1500(ActivityThread.java:144)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Handler.dispatchMessage(Handler.java:102)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Looper.loop(Looper.java:135)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.main(ActivityThread.java:5221)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Method.java:372)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
12-14 22:42:34.313: E/AndroidRuntime(17385): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.Instrumentation.newApplication(Instrumentation.java:979)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
12-14 22:42:34.313: E/AndroidRuntime(17385):     ... 10 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Suppressed: java.lang.ClassNotFoundException: com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.Class.classForName(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-14 22:42:34.313: E/AndroidRuntime(17385):         ... 13 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I use the Eclipse ADT Bundle.
Version of Java is 1.8 (I have tried with 1.6 also)
Target API was 19
forcedroid version is 3.0.1

I suspect that the real issue will be something to do with the invalid project reference, as I wouldn't expect any errors after runing a fresh create and import like this.

Any help would be greatly appreciated.
Hi,

I have followed the steps on how to setup and install a hybrid local application on android from the 'Mobile SDK Development Guide - Salesforce Mobile SDK 3.0' documentation. However I keep hitting the same error.

After importing the relavant projects into Eclipse, as stated by in the forcedroid output, there are 115 errors. I noticed the cordova reference was invalid in the SalesforceSDK project, pointing to '..\..\external\cordova\framework'. I change this to point to the CordovaApp-CordovaLib project in Eclipse, and after rebuilding the errors were gone.

However whenever I run the application I then get the following error:
 
12-14 22:42:34.313: E/AndroidRuntime(17385): FATAL EXCEPTION: main
12-14 22:42:34.313: E/AndroidRuntime(17385): Process: com.testapp.mytestapp, PID: 17385
12-14 22:42:34.313: E/AndroidRuntime(17385): java.lang.RuntimeException: Unable to instantiate application com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.access$1500(ActivityThread.java:144)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Handler.dispatchMessage(Handler.java:102)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Looper.loop(Looper.java:135)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.main(ActivityThread.java:5221)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Method.java:372)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
12-14 22:42:34.313: E/AndroidRuntime(17385): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.Instrumentation.newApplication(Instrumentation.java:979)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
12-14 22:42:34.313: E/AndroidRuntime(17385):     ... 10 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Suppressed: java.lang.ClassNotFoundException: com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.Class.classForName(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-14 22:42:34.313: E/AndroidRuntime(17385):         ... 13 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I use the Eclipse ADT Bundle.
Version of Java is 1.8 (I have tried with 1.6 also)
Target API was 19
forcedroid version is 3.0.1

I suspect that the real issue will be something to do with the invalid project reference, as I wouldn't expect any errors after runing a fresh create and import like this.

Any help would be greatly appreciated.