I'm trying to draw a picture on the google map. I'm using the latest version of google play services and checked a lot for this issue and couldn't find an answer.
Here's some code:
BitmapDescriptor image = BitmapDescriptorFactory.fromResource(R.drawable.drawing_bg);
LatLngBounds drawingBounds = new LatLngBounds(
new LatLng(29.93530, 30.88324),
new LatLng(29.93609, 30.88329))
.including(new LatLng(29.93580, 30.88286))
.including(new LatLng(29.93563, 30.88374))
.including( new LatLng(29.93593, 30.88347))
.including(new LatLng(29.93561, 30.88298))
.including(new LatLng(29.93591, 30.88344))
.including(new LatLng(29.93563, 30.88301));
GroundOverlay groundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(image)
.zIndex(2)
.positionFromBounds(drawingBounds)
.transparency((float) 0.0));
final Marker currentLocationMarker = mMap.addMarker(new MarkerOptions().position(new LatLng(29.93530, 30.88324)).draggable(true));
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(29.935431502437588,30.88327579200268), 20));
From LogCat:
05-03 11:45:17.860: E/dalvikvm-heap(1115): Out of memory on a 67108880-byte allocation.
05-03 11:45:17.860: I/dalvikvm(1115): "GLThread 8598" prio=5 tid=21 RUNNABLE
05-03 11:45:17.860: I/dalvikvm(1115): | group="main" sCount=0 dsCount=0 obj=0x4284d580 self=0x5a559790
05-03 11:45:17.860: I/dalvikvm(1115): | sysTid=1502 nice=1 sched=0/0 cgrp=apps handle=1596223616
05-03 11:45:17.860: I/dalvikvm(1115): | schedstat=( 216011094 92043700 221 ) utm=19 stm=2 core=3
05-03 11:45:17.860: I/dalvikvm(1115): at android.graphics.Bitmap.nativeCreate(Native Method)
05-03 11:45:17.860: I/dalvikvm(1115): at android.graphics.Bitmap.createBitmap(Bitmap.java:640)
05-03 11:45:17.860: I/dalvikvm(1115): at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.s.h.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.cr.a.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.cr.a.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.z.aa.b((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.z.aa.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.z.bi.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.af.v.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.af.v.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.af.v.a((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.p.q.m((null):-1)
05-03 11:45:17.860: I/dalvikvm(1115): at maps.p.q.run((null):-1)
05-03 11:45:17.875: W/dalvikvm(1115): threadid=21: thread exiting with uncaught exception (group=0x412cc2a0)
05-03 11:45:17.880: E/AndroidRuntime(1115): FATAL EXCEPTION: GLThread 8598
05-03 11:45:17.880: E/AndroidRuntime(1115): java.lang.OutOfMemoryError
05-03 11:45:17.880: E/AndroidRuntime(1115): at android.graphics.Bitmap.nativeCreate(Native Method)
05-03 11:45:17.880: E/AndroidRuntime(1115): at android.graphics.Bitmap.createBitmap(Bitmap.java:640)
05-03 11:45:17.880: E/AndroidRuntime(1115): at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.s.h.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.cr.a.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.cr.a.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.z.aa.b(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.z.aa.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.z.bi.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.af.v.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.af.v.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.af.v.a(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.p.q.m(Unknown Source)
05-03 11:45:17.880: E/AndroidRuntime(1115): at maps.p.q.run(Unknown Source)
05-03 11:45:29.395: W/SurfaceView(1115): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=false left=false top=false
I would really appreciate any help
You should not be using images that are too large. You logcat suggests you try to allocate 67 MB, which is way too much for most of the devices.
Edit:
Maybe try using TileOverlay instead of GroundOverlay if you want to show images on a large area (city, country) and not have it pixelated when zoomed.
These 67Mb you are seeing seem to be from a confirmed bug in google maps, see here for more info: https://code.google.com/p/gmaps-api-issues/issues/detail?id=7325
It was fixed back in February (2015 for the record). It should be solved if you use the latest version of google maps.
Related
I wanted to obtain user access token for my application to access logged-in user's photos etc. I created a login button as given on facebook android SDK tutorials. I am able to get access token for my admin account which created this application on facebook.
But when I login with any other account, it throws following exception:
I don't understand what I am doing wrong. Ideally, all other persons should be able to login to this app. I am testing it on an emulator. Could it be a problem?
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): Exception during service
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): com.facebook.orca.protocol.base.ApiException: Invalid application 332039450257790
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponseChecker.b(ApiResponseChecker.java:74)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponseChecker.a(ApiResponseChecker.java:103)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponse.g(ApiResponse.java:208)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:267)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:28)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.SingleMethodRunner.a(SingleMethodRunner.java:125)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.handler.PlatformOperationHandler.c(PlatformOperationHandler.java:274)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.handler.PlatformOperationHandler.a(PlatformOperationHandler.java:175)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:218)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:38)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue$3.run(OrcaServiceQueue.java:169)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Handler.handleCallback(Handler.java:587)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Handler.dispatchMessage(Handler.java:92)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Looper.loop(Looper.java:123)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.HandlerThread.run(HandlerThread.java:60)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): Failed to send
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): com.facebook.orca.ops.ServiceException: API_ERROR: API_ERROR
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation.c(OrcaServiceOperation.java:610)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation.c(OrcaServiceOperation.java:40)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation$2.run(OrcaServiceOperation.java:575)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Handler.handleCallback(Handler.java:587)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Handler.dispatchMessage(Handler.java:92)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Looper.loop(Looper.java:123)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at java.lang.reflect.Method.invoke(Method.java:521)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at dalvik.system.NativeStart.main(Native Method)
Actually during app creation, I had wrongly selected 'sandboxed' mode which restricts app's access only to developers added in app configuration page. So after disabling this mode, I was able to generate access token for other users too.
I am creating multiple activities in Android, this is my logcat error output.
log.txt
05-03 03:17:23.295: E/PhonePolicy(1854): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
05-03 03:17:37.044: W/dalvikvm(1854): threadid=1: thread exiting with uncaught exception (group=0x409db1f8)
05-03 03:17:37.044: E/AndroidRuntime(1854): FATAL EXCEPTION: main
05-03 03:17:37.044: E/AndroidRuntime(1854): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jumoun.itemp/com.jumoun.itemp.Converter}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.os.Looper.loop(Looper.java:137)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread.main(ActivityThread.java:4427)
05-03 03:17:37.044: E/AndroidRuntime(1854): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 03:17:37.044: E/AndroidRuntime(1854): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 03:17:37.044: E/AndroidRuntime(1854): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
05-03 03:17:37.044: E/AndroidRuntime(1854): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
05-03 03:17:37.044: E/AndroidRuntime(1854): at dalvik.system.NativeStart.main(Native Method)
05-03 03:17:37.044: E/AndroidRuntime(1854): Caused by: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
05-03 03:17:37.044: E/AndroidRuntime(1854): at com.jumoun.itemp.Converter.onCreate(Converter.java:41)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.Activity.performCreate(Activity.java:4465)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-03 03:17:37.044: E/AndroidRuntime(1854): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-03 03:17:37.044: E/AndroidRuntime(1854): ... 11 more
05-03 03:17:38.704: I/Process(1854): Sending signal. PID: 1854 SIG: 9
This is my java file Converter.java
http://pastebin.com/VNNPy7D5
Thanks guys :)
If I counted right this
ibHome3 = (Button) findViewById(R.id.ibHome3);
is causing your problem. You have it as an ImageButton in your xml but Button in your java declaration. Just change it to
ImageButton ibHome3;
About Logcat
Also, just a little advice on logcat. If you find the first line that says Caused By after Fatal Exception you can track down your problem easier. Here it is
Caused by: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
this gives the exception
java.lang.ClassCastException
then find the first line after that which references your package. Here
at com.jumoun.itemp.Converter.onCreate(Converter.java:41)
this tells us the problem starts in Converter.java at line 41
You have two buttons in your layout file, right? They looks to be defined as ImageButton in the XML file. In your Activity, you declare it as Button and try to convert with a cast to (Button). Change your type to ImageButton on your Activity file. It may solve your prolbem.
On line 41, you have to cast your button to ImageButton and not Button :
ibHome3 = (ImageButton) findViewById(R.id.ibHome3);
When getting the list of packages which is running in devices, i am getting the execption proxy stub exception from my logcat
This the code i used
List packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
This the exception which im am getting
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40ab1478 self=0x112f910
| sysTid=1801 nice=0 sched=0/0 cgrp=default handle=1074439528
| schedstat=( 0 0 0 ) utm=465 stm=85 core=1
at android.os.BinderProxy.transact(Native Method)
at android.content.pm.IPackageManager$Stub$Proxy.getInstalledApplications(IPackageManager.java:1930)
at android.app.ApplicationPackageManager.getInstalledApplications(ApplicationPackageManager.java:414)
at com.informate.smnpd.DataUsageAppManager.processData1(DataUsageAppManager.java:237)
at com.informate.smnpd.DataUsageAppManager.processData(DataUsageAppManager.java:114)
at com.informate.smnpd.BackgroundService.getData(BackgroundService.java:667)
at com.informate.smnpd.ManualUpdate.onClick(ManualUpdate.java:221)
at android.view.View.performClick(View.java:3526)
at android.view.View$PerformClick.run(View.java:14133)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4697)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
Can anyone please guide me on why this exception will occures at the time of getting installed package name. Thanks in advance
I have installed android sdk from this link http://developer.android.com/sdk/index.html.(installer_r18-windows.... android app is working fine.but my phonegap app is not running.same phonegap app is working in installer_r12-windows.exe
Error Message
05-03 19:55:36.310: E/AndroidRuntime(743): FATAL EXCEPTION: main
05-03 19:55:36.310: E/AndroidRuntime(743): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.app.mobilyzer/com.app.mobilyzer.MobilyzerActivity}: java.lang.ClassNotFoundException: com.app.mobilyzer.MobilyzerActivity
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.os.Looper.loop(Looper.java:137)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 19:55:36.310: E/AndroidRuntime(743): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-03 19:55:36.310: E/AndroidRuntime(743): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-03 19:55:36.310: E/AndroidRuntime(743): at dalvik.system.NativeStart.main(Native Method)
05-03 19:55:36.310: E/AndroidRuntime(743): Caused by: java.lang.ClassNotFoundException: com.app.mobilyzer.MobilyzerActivity
05-03 19:55:36.310: E/AndroidRuntime(743): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
05-03 19:55:36.310: E/AndroidRuntime(743): ... 11 more
You have placed you Jar file in some random folder and then did "Add to build path". This will work in versions older than r17. But now you have to create a folder named libs in your project folder and then just add the phonegap jar file in it and automatically it will be added to class path. And you will not get this issue.
Declare the activity in the Android Manifest? Make sure the launcher activity has the right name? Both possible solutions :D
I am using greenDao to access database in my Android phone. Everything seems fine, and complied. But when I run the program, it crashed at DaoMaster.java -> OpenHelper class, onCreate method at createAllTables(db, false);
Below are the Exception message:
>05-03 15:40:34.109: E/AndroidRuntime(28587): FATAL EXCEPTION: main
05-03 15:40:34.109: E/AndroidRuntime(28587): java.lang.NoClassDefFoundError: com.hook38.sporttimer.model.sql.DaoMaster
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.model.sql.DaoMaster$OpenHelper.onCreate(DaoMaster.java:42)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:165)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.controller.CountdownTimerStoreController.<init>(CountdownTimerStoreController.java:32)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.controller.CountdownTimerController.<init>(CountdownTimerController.java:57)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.CountDownTimerActivity.onCreate(CountDownTimerActivity.java:49)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.Activity.performCreate(Activity.java:4465)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.os.Looper.loop(Looper.java:137)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-03 15:40:34.109: E/AndroidRuntime(28587): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 15:40:34.109: E/AndroidRuntime(28587): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-03 15:40:34.109: E/AndroidRuntime(28587): at dalvik.system.NativeStart.main(Native Method)
I did some research on NoClassDefFoundError, and it means CLASSPATH was not set properly. but I checked the build path, greenDao.jar is in the library. Is there something I miss out??
I solved the problem. I was using the greenDao.jar file from the DaoExample project. The way to solve this is... remove the original greenDao.jar from my java build path. Make a folder call libs under my project. copy the geenDao.jar file from the libs folder in DaoExample project, and paste it into the libs file in my own project. Go to Java build path, libraries, import jar, and add the newly pasted jar file. wala~
The solution is ultra simple - Ensure Maven Dependencies are exported:
Project Properties -> Java Build Path -> Order and Export -> Tick Maven Dependencies
Clean Project