Nativescript use Android library - nativescript

Could help me. I tried implement Android library in Nativescript.
I create Android Project -> New Module -> Andorid library.
Create Java Class
platforms\android\nativescript-serial-port\serialport\src\main\java\com\nativescript\serialport\Toaster.java
package com.nativescript.serialport;
import android.content.Context;
import android.widget.Toast;
public class Toaster {
public Toaster() {}
public void show(Context context) {
Toast.makeText(context, "Hello NativeScript!", Toast.LENGTH_SHORT).show();
}
}
Add in file nativescript project platforms\android\settings.gradle
include ':app', ':serialport'
project(':serialport').projectDir = new File('nativescript-serial-port/serialport')
Add in file nativescript app app\App_Resources\Android\app.gradle
dependencies {
implementation project(":serialport")
}
Add in JS file nativescript project some-file.js
import * as app from 'application';
const context = android.content.Context;
const toaster = new com.nativescript.serialport.Toaster();
toaster.show(context);
And if I run this code appear error
System.err: TypeError: com.nativescript.serialport.Toaster is not a constructor
System.err: File: "file:///data/data/org.nativescript.application/files/app/bundle.js,
line: 372, column: 22
System.err:
System.err: StackTrace:
System.err: Frame: function:'onPrint', file:'file:///data/data/org.nativescript.application/files/app/bundle.js',
line: 372, column: 23
System.err: Frame: function:'invoker', file:'file:///data/data/org.nativescript.application/files/app/vendor.js',
line: 4168, column: 18
System.err: Frame: function:'Observable.notify', file:'file:///data/data/org.nativescript.application/files/app/vendor.js',
line: 17698, column: 15
System.err: Frame: function:'Observable._emit', file:'file:///data/data/org.nativescript.application/files/app/vendor.js',
line: 17726, column: 12
System.err: Frame: function:'ClickListenerImpl.onClick', file:'file:///data/data/org.nativescript.application/files/app/vendor.js',
line: 29193, column: 15
System.err:
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1120)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1000)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:987)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:967)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:959)
System.err: at com.tns.gen.java.lang.Object_vendor_29183_26_ClickListenerImpl.onClick(Object_vendor_29183_26_ClickListenerImpl.java:17)
System.err: at android.view.View.performClick(View.java:6597)
System.err: at android.view.View.performClickInternal(View.java:6574)
System.err: at android.view.View.access$3100(View.java:778)
System.err: at android.view.View$PerformClick.run(View.java:25885)
System.err: at android.os.Handler.h
andleCallback(Handler.java:873) System.err: at
android.os.Handler.dispatchMessage(Handler.java:99) System.err: at
android.os.Looper.loop(Looper.java:193) System.err: at
android.app.ActivityThread.main(ActivityThread.java:6669) System.err:
at java.lang.reflect.Method.invoke(Native Method) System.err: at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
System.err: at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
How fix this error. Thanks

Related

Make AppInsights work with a NativeScript application

I'm trying to make a NativeScript app write logs to Azure AppInsight. I'm using npm package "#microsoft/applicationinsights-web" for that (2.5.8).
Upon the application start I'm getting this error while trying to call new ApplicationInsights():
System.err: TypeError: Cannot assign to read only property '__extends' of object '[object global]'
System.err: File: (file: node_modules\#microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:96:0)
System.err:
System.err: StackTrace:
System.err: (file: node_modules\#microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:96:0)
System.err: at (file: node_modules\#microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:97:1)
System.err: at ../node_modules/#microsoft/applicationinsights-shims/dist-esm/applicationinsights-shims.js(file:///data/data/com.mycompany.live/files/app/vendor.js:95073:30)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/#microsoft/applicationinsights-web/dist-esm/applicationinsights-web.js(file: node_modules\#microsoft\applicationinsights-web\dist-esm\applicationinsights-web.js:1:0)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/tracking.service.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1681:92)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/default-error-handler.service.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1316:75)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/index.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1351:88)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/app.module.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:214:66)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/com.mycompany.live/files/app/bundle.js:2027:73)
System.err: at ./main.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:2095:30)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0)
System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0)
System.err: at (file:///data/data/com.mycompany.live/files/app/bundle.js:2:57)
System.err: at require(:1:266)
I wonder if someone has already found a solution for this issue.

“Inconsistent stackmap frames” exception when trying to create a new object

I'm having trouble to write a Unit Test because I'm getting this exception when trying to create a new object of EquifaxDLPingRequest class. I've simplified the code just to show the problem:
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
#RunWith(PowerMockRunner.class)
#PrepareForTest({EquifaxDLPingRequest.class})
public class SimpleTest {
#Test
public void test() {
EquifaxDLPingRequest equifaxDLPingRequest = new EquifaxDLPingRequest("");
}
}
When the equifaxDLPingRequest is created I'm having this exception:
java.lang.VerifyError: Inconsistent stackmap frames at branch target 46
Exception Details:
Location:
com/dealflo/vhub/maintenance/passwordchanger/AbstractMaintenanceRequest.<init>(Lorg/powermock/core/IndicateReloadClass;)V #46: aload_2
Reason:
Type uninitializedThis (current frame, locals[2]) is not assignable to 'com/dealflo/vhub/maintenance/passwordchanger/AbstractMaintenanceRequest' (stack map, locals[2])
Current Frame:
bci: #32
flags: { flagThisUninit }
locals: { uninitializedThis, 'org/powermock/core/IndicateReloadClass', uninitializedThis, 'org/powermock/core/IndicateReloadClass', top, 'java/lang/Object' }
stack: { 'java/lang/Object', 'java/lang/Object' }
Stackmap Frame:
bci: #46
flags: { flagThisUninit }
locals: { uninitializedThis, 'org/powermock/core/IndicateReloadClass', 'com/dealflo/vhub/maintenance/passwordchanger/AbstractMaintenanceRequest', 'org/powermock/core/IndicateReloadClass' }
stack: { }
Bytecode:
0000000: 2a2b 4e4d 12d7 b800 6a04 bd00 1b59 032d
0000010: 5312 d8b8 00ce b800 da3a 0519 05b2 002b
0000020: a500 0e2a 01c0 002d b700 dca7 000a 2c2d
0000030: b700 dc01 57b1
Stackmap Table:
append_frame(#46,Object[#16],Object[#45])
chop_frame(#53,2)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javassist.runtime.Desc.getClassObject(Desc.java:44)
at javassist.runtime.Desc.getClassType(Desc.java:153)
at javassist.runtime.Desc.getType(Desc.java:123)
at javassist.runtime.Desc.getType(Desc.java:79)
at com.dealflo.vhub.maintenance.passwordchanger.SimpleTest.test(SimpleTest.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:310)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:94)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:127)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:106)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
The exception is thown only when I add #PrepareForTest({EquifaxDLPingRequest.class}) but I have to use PowerMockito and #PrepareForTest({EquifaxDLPingRequest.class}) because later I have to mock a local variable.
I know about the -XX:-UseSplitVerifier and -noverify jvm options but I can't use them in my project.
Can anyone explain why this is happening and how can I solve it?

Failed Resolution of R$Drawable when using a bound Java Library

I am binding the java library Material CalendarView. With a set of 12 transforms in Metadata.xml I could bind the library with 0 errors and 15 warnings. I have added Support Library v4 Component ver 23.1.1 in the binding project as the jar file had a dependency on that. Also I have ensured that all the Resource assets are included in the jar file.
When I use this library in an Android Sample like below,
var materialCalendar= new MaterialCalendarView(this);
this exception gets thrown
Failed resolution of: Lcom/prolificinteractive/materialcalendarview/R$drawable;
Java.Lang.NoClassDefFoundError: Failed resolution of: Lcom/prolificinteractive/materialcalendarview/R$drawable; ---> Java.Lang.ClassNotFoundException: Didn't find class "com.prolificinteractive.materialcalendarview.R$drawable" on path: DexPathList[[zip file "/data/app/com.fingent.materialcalendarsample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.fingent.materialcalendarsample-1/lib/x86, /vendor/lib, /system/lib]]
at --- End of managed exception stack trace ---
at java.lang.ClassNotFoundException: Didn't find class "com.prolificinteractive.materialcalendarview.R$drawable" on path: DexPathList[[zip file "/data/app/com.fingent.materialcalendarsample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.fingent.materialcalendarsample-1/lib/x86, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.setupChildren(MaterialCalendarView.java:358)
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.<init>(MaterialCalendarView.java:237)
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.<init>(MaterialCalendarView.java:216)
at at md56fd5622393123d59c6c51d78708f2ed2.MainActivity.n_onCreate(Native Method)
at at md56fd5622393123d59c6c51d78708f2ed2.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5990)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at at android.app.ActivityThread.access$800(ActivityThread.java:151)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5254)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
at Suppressed: java.lang.ClassNotFoundException: com.prolificinteractive.materialcalendarview.R$drawable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 19 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00084] in /Users/builder/data/lanes/3053/a94a03b5/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1029
at Android.Runtime.JNIEnv.FinishCreateInstance (IntPtr instance, IntPtr jclass, IntPtr constructorId, Android.Runtime.JValue* constructorParameters) [0x0000b] in /Users/builder/data/lanes/3053/a94a03b5/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:306
at MaterialCalendarLibrary.MaterialCalendarView..ctor (Android.Content.Context p0) [0x000c5] in /Users/fingent/Projects/MaterialCalendarLibrary/MaterialCalendarLibrary/obj/Release/generated/src/MaterialCalendarLibrary.MaterialCalendarView.cs:505
at MaterialCalendarSample.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00009] in /Users/fingent/Documents/sreeraj/workspace/Xamarin.MaterialCalendarView/MaterialCalendarSample/MainActivity.cs:17
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3053/a94a03b5/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.App.Activity.cs:2475
at at (wrapper dynamic-method) System.Object:0b8c341c-2f19-42d5-83e9-b3a815827e69 (intptr,intptr,intptr)
at --- End of managed exception stack trace ---
at java.lang.NoClassDefFoundError: Failed resolution of: Lcom/prolificinteractive/materialcalendarview/R$drawable;
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.setupChildren(MaterialCalendarView.java:358)
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.<init>(MaterialCalendarView.java:237)
at at com.prolificinteractive.materialcalendarview.MaterialCalendarView.<init>(MaterialCalendarView.java:216)
at at md56fd5622393123d59c6c51d78708f2ed2.MainActivity.n_onCreate(Native Method)
at at md56fd5622393123d59c6c51d78708f2ed2.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5990)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at at android.app.ActivityThread.access$800(ActivityThread.java:151)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5254)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
at Caused by: java.lang.ClassNotFoundException: Didn't find class "com.prolificinteractive.materialcalendarview.R$drawable" on path: DexPathList[[zip file "/data/app/com.fingent.materialcalendarsample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.fingent.materialcalendarsample-1/lib/x86, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at ... 18 more
at Suppressed: java.lang.ClassNotFoundException: com.prolificinteractive.materialcalendarview.R$drawable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 19 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Here is the link to the project in Github Xamarin Material CalendarView
It's about missing Resources that should be attached in Material CalendarView, you need an AAR file.
Just go Maven and get latest AAR file that published by Author: http://mvnrepository.com/artifact/com.prolificinteractive/material-calendarview/1.2.0
Remove the material-calendarview.jar and drag new file material-calendarview-1.2.0.aar on your binding project, done!
A Drawable is a graphic resource and the Java exception is on the following line (from the lib your binding):
buttonPast.setImageResource(R.drawable.mcv_action_previous);
So you are missing mcv_action_previous which a PNG-based arrow located in the res/drawable-xxxhdpi/mcv_action_previous.png within the project that you are binding.
Are all the resources included? Any of your binding transformations or binding warning about resources?

i have an error in my background service and i'm using volley library

12-21 16:36:20.522 24309-24309/islamicapp.com.ranatechnology.ww.tawfiiqislamiccenter E/AndroidRuntime: FATAL EXCEPTION: main
Process: islamicapp.com.ranatechnology.ww.tawfiiqislamiccenter, PID: 24309
java.lang.OutOfMemoryError: pthread_create (stack size 16384 bytes) failed: Try again
at java.lang.VMThread.create(Native Method)
at java.lang.Thread.start(Thread.java:1029)
at com.android.volley.RequestQueue.start(RequestQueue.java:152)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:79)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:105)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:115)
at islamicapp.com.ranatechnology.ww.Service.NotificationService.servicestart(NotificationService.java:139)
at islamicapp.com.ranatechnology.ww.Service.NotificationService.onStartCommand(NotificationService.java:58)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2712)
at android.app.ActivityThread.access$2100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5120)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(Native Method)

VerifyError using Jersey Client

I have a problem with using the Jersey Client
I am using jersey-bundle-1.17.1.jar
When i try to create a Client i throw at Runtime.
Client c = Client.create();
logcat:
01-29 12:46:52.578 13862-13862/com.example.spar.navigationdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.spar.navigationdrawer, PID: 13862
java.lang.VerifyError: com/sun/jersey/core/impl/provider/entity/MimeMultipartProvider
at java.lang.Class.getDeclaredConstructors(Native Method)
at java.lang.Class.getConstructors(Class.java:508)
at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:174)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:160)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:342)
at com.sun.jersey.api.client.Client.access$000(Client.java:118)
at com.sun.jersey.api.client.Client$1.f(Client.java:191)
at com.sun.jersey.api.client.Client$1.f(Client.java:187)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:187)
at com.sun.jersey.api.client.Client.<init>(Client.java:159)
at com.sun.jersey.api.client.Client.create(Client.java:669)
at com.example.spar.navigationdrawer.client.ArticleClient.getArticles(ArticleClient.java:38)
at com.example.spar.navigationdrawer.MyActivity.<init>(MyActivity.java:72)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2122)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)

Resources