Android Maps v2 Stopped Working - android

I've had Google Maps v2 up and running for months, no code has changed, and now every fragment with a MapFragment crashes when attached. (Building without proguard and signing with debug key)
I am guessing that it has to do with Play Services, because it appeared to work after re-installing the Play Services updates. But now it crashes again, even with re-installing. This occurs on two Samsung Note 8s, a Note 3, a Note 1, and a Nexus 5.
I have tried clean builds and regenerating the Maps API with a different Google APIs account.
I've included the necessary bits in my AndroidManifest:
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/app_id_maps"/>
I include the following xml in the my fragment layouts:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="#+id/map"
android:name="com.google.android.gms.maps.MapFragment"
map:mapType="normal"
map:uiCompass="true"
map:uiRotateGestures="true"
map:uiScrollGestures="true"
map:uiTiltGestures="true"
map:uiZoomControls="false"
map:uiZoomGestures="true"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Logcat:
07-31 08:23:57.721 31926-31926/com.packagename I/u﹕ Making Creator dynamically
07-31 08:23:57.731 31926-31926/com.packagename I/Google Maps Android API﹕ Google Play services client version: 5077000
07-31 08:23:57.731 31926-31926/com.packagename I/dalvikvm﹕ Could not find method guj.a, referenced from method gqi.a
07-31 08:23:57.731 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve static method 24936: Lguj;.a (Landroid/content/Context;)Lgri;
07-31 08:23:57.731 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0003
07-31 08:23:57.731 31926-31926/com.packagename E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-31 08:23:57.731 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-31 08:23:57.731 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-31 08:23:57.736 31926-31926/com.packagename E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-31 08:23:57.736 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-31 08:23:57.736 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-31 08:23:57.736 31926-31926/com.packagename E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-31 08:23:57.736 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-31 08:23:57.736 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-31 08:23:57.736 31926-31926/com.packagename D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a
07-31 08:23:57.736 31926-31926/com.packagename D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0c in Lgps;.a
07-31 08:23:57.736 31926-31926/com.packagename D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a
07-31 08:23:57.741 31926-31926/com.packagename I/Google Maps Android API﹕ Google Play services package version: 5084030
07-31 08:23:57.746 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve static field 20873 (t) in Lyp;
07-31 08:23:57.746 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x000e
07-31 08:23:57.746 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve static field 20873 (t) in Lyp;
07-31 08:23:57.746 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x000d
07-31 08:23:57.846 31926-31926/com.packagename I/dalvikvm﹕ Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lgln;'
07-31 08:23:57.846 31926-31926/com.packagename W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
07-31 08:23:57.846 31926-31926/com.packagename E/dalvikvm﹕ Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
07-31 08:23:57.846 31926-31926/com.packagename W/dalvikvm﹕ VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;
07-31 08:23:57.846 31926-31926/com.packagename D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0019
07-31 08:23:57.886 31926-31926/com.packagename D/dalvikvm﹕ GC_FOR_ALLOC freed 3142K, 31% free 10122K/14616K, paused 19ms, total 19ms
07-31 08:23:57.901 31926-31926/com.packagename D/AbsListView﹕ Get MotionRecognitionManager
07-31 08:23:57.916 31926-32063/com.packagename A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 32063 (DataRequestDisp)
07-31 08:23:57.921 31926-31926/com.packagename D/ProgressBar﹕ setProgressDrawable drawableHeight = 0
07-31 08:23:57.921 31926-31926/com.packagename D/AbsSeekBar﹕ AbsSeekBar Constructor: misSeebarAnimationAvailable = false
07-31 08:23:57.956 31926-31926/com.packagename W/GmsClientEvents﹕ registerConnectionCallbacks(): listener com.google.android.gms.internal.hc$c#429b29d0 is already registered
07-31 08:23:58.011 31926-31926/com.packagename D/ProgressBar﹕ updateDrawableBounds: left = 0
07-31 08:23:58.011 31926-31926/com.packagename D/ProgressBar﹕ updateDrawableBounds: top = 0
07-31 08:23:58.011 31926-31926/com.packagename D/ProgressBar﹕ updateDrawableBounds: right = 64
07-31 08:23:58.011 31926-31926/com.packagename D/ProgressBar﹕ updateDrawableBounds: bottom = 64
On Samsung devices I also get this stacktrace:
07-31 08:23:57.656 31926-31926/com.packagename W/dalvikvm﹕ No implementation found for native Ldalvik/system/VMRuntime;.pauseGc:(Ljava/lang/String;)I
07-31 08:23:57.661 31926-31926/com.packagename E/ActivityThread﹕ Pause GC
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.app.ActivityThread.pauseGC(ActivityThread.java:5410)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
at android.app.ActivityThread.access$900(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5487)
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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: dalvik.system.VMRuntime.pauseGc:(Ljava/lang/String;)I
at dalvik.system.VMRuntime.pauseGc(Native Method)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.app.ActivityThread.pauseGC(ActivityThread.java:5410)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
at android.app.ActivityThread.access$900(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5487)
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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)

Related

Picasso doesn't load some urls on android 4.4

I'm trying to load with Picasso some images that I get from client's backend but on android 4.4 it doesn't work. All other urls from the internet that I tried work fine except for those that I get from backend.
private ImageView imageView;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
imageView = (ImageView) findViewById(R.id.image);
Picasso.with(this)
.load("https://sdo.gsfc.nasa.gov/assets/img/latest/latest_2048_HMIIC.jpg")
.into(imageView);
}
If I replace https://sdo.gsfc.nasa.gov/assets/img/latest/latest_2048_HMIIC.jpg with any other url from web, it will work fine.
Logs that I get:
09-04 08:16:42.261 18094-18094/? D/dalvikvm: Late-enabling CheckJNI
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve interface method 17054: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve interface method 17056: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve interface method 17060: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 475: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
09-04 08:16:42.361 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
09-04 08:16:42.371 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
09-04 08:16:42.371 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 497: Landroid/content/res/TypedArray;.getType (I)I
09-04 08:16:42.371 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
09-04 08:16:42.441 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
09-04 08:16:42.441 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 17491: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
09-04 08:16:42.441 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
09-04 08:16:42.451 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
09-04 08:16:42.451 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 284: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
09-04 08:16:42.451 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 438: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve virtual method 440: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
09-04 08:16:42.461 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
09-04 08:16:42.471 18094-18094/com.witanowski.myapplication E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
09-04 08:16:42.471 18094-18094/com.witanowski.myapplication W/dalvikvm: VFY: unable to resolve instanceof 144 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
09-04 08:16:42.471 18094-18094/com.witanowski.myapplication D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
09-04 08:16:42.511 18094-18094/com.witanowski.myapplication W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
09-04 08:16:42.531 18094-18094/com.witanowski.myapplication D/Picasso: Main created [R0] Request{https://btv.leankr.com/api/v1/thumbs/640x360/RTL9/programs/RTL9__112-Unite-durgence.jpg}
09-04 08:16:42.531 18094-18134/com.witanowski.myapplication D/Picasso: Hunter executing [R0]+9ms
09-04 08:16:42.531 18094-18132/com.witanowski.myapplication D/Picasso: Dispatcher enqueued [R0]+8ms
09-04 08:16:42.601 18094-18094/com.witanowski.myapplication I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 08/12/14 Tue
Local Branch:
Remote Branch: quic/LNX.LA.3.5.2.2_rb1
Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
09-04 08:16:42.621 18094-18094/com.witanowski.myapplication D/OpenGLRenderer: Enabling debug mode 0
09-04 08:16:42.711 18094-18094/com.witanowski.myapplication I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#43ae7788 time:21977122
09-04 08:16:43.771 18094-18132/com.witanowski.myapplication D/Picasso: Dispatcher retrying [R0]+1246ms
09-04 08:16:43.781 18094-18164/com.witanowski.myapplication D/Picasso: Hunter executing [R0]+1253ms
09-04 08:16:44.731 18094-18132/com.witanowski.myapplication D/Picasso: Dispatcher retrying [R0]+2201ms
09-04 08:16:44.731 18094-18181/com.witanowski.myapplication D/Picasso: Hunter executing [R0]+2204ms
09-04 08:16:44.751 18094-18132/com.witanowski.myapplication D/Picasso: Dispatcher batched [R0]+2224ms for error
09-04 08:16:44.951 18094-18094/com.witanowski.myapplication D/Picasso: Main errored [R0]+2429ms
09-04 08:16:44.961 18094-18132/com.witanowski.myapplication D/Picasso: Dispatcher delivered [R0]+2430ms
I am thinking that the backend image size is too huge so picasso take's time to load on imageview. so use placeholder and error methods of picasso and wait for 20 sec I think it will be load.
Picasso.get()
.load(url)
.placeholder(R.drawable.user_placeholder)
.error(R.drawable.user_placeholder_error)
.into(imageView);

How to debug an error when I create a string in login method? [duplicate]

This question already has answers here:
Can not find a View with findViewById()
(4 answers)
What is a NullPointerException, and how do I fix it?
(12 answers)
What is a stack trace, and how can I use it to debug my application errors?
(7 answers)
Closed 5 years ago.
03-30 23:49:56.536 15105-15105/? D/dalvikvm: Late-enabling CheckJNI
03-30 23:49:56.560 15105-15111/? E/jdwp: Failed writing handshake
bytes: Broken pipe (-1 of 14) 03-30 23:49:56.560 15105-15111/?
D/dalvikvm: Debugger has detached; object registry had 0 entries 03-30
23:49:56.600 15105-15105/? I/dalvikvm: Could not find method
android.view.Window$Callback.onProvideKeyboardShortcuts, referenced
from method
android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
03-30 23:49:56.600 15105-15105/? W/dalvikvm: VFY: unable to resolve
interface method 21845:
Landroid/view/Window$Callback;.onProvideKeyboardShortcuts
(Ljava/util/List;Landroid/view/Menu;I)V 03-30 23:49:56.600
15105-15105/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 03-30
23:49:56.604 15105-15105/? W/dalvikvm: VFY: unable to find class
referenced in signature (Landroid/view/SearchEvent;) 03-30
23:49:56.604 15105-15105/? I/dalvikvm: Could not find method
android.view.Window$Callback.onSearchRequested, referenced from method
android.support.v7.view.WindowCallbackWrapper.onSearchRequested 03-30
23:49:56.604 15105-15105/? W/dalvikvm: VFY: unable to resolve
interface method 21847:
Landroid/view/Window$Callback;.onSearchRequested
(Landroid/view/SearchEvent;)Z 03-30 23:49:56.604 15105-15105/?
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 03-30 23:49:56.604
15105-15105/? I/dalvikvm: Could not find method
android.view.Window$Callback.onWindowStartingActionMode, referenced
from method
android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
03-30 23:49:56.604 15105-15105/? W/dalvikvm: VFY: unable to resolve
interface method 21851:
Landroid/view/Window$Callback;.onWindowStartingActionMode
(Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 03-30
23:49:56.604 15105-15105/? D/dalvikvm: VFY: replacing opcode 0x72 at
0x0002 03-30 23:49:56.604 15105-15105/? I/dalvikvm: Could not find
method android.content.res.TypedArray.getChangingConfigurations,
referenced from method
android.support.v7.widget.TintTypedArray.getChangingConfigurations
03-30 23:49:56.604 15105-15105/? W/dalvikvm: VFY: unable to resolve
virtual method 502:
Landroid/content/res/TypedArray;.getChangingConfigurations ()I 03-30
23:49:56.604 15105-15105/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0002 03-30 23:49:56.604 15105-15105/? I/dalvikvm: Could not find
method android.content.res.TypedArray.getType, referenced from method
android.support.v7.widget.TintTypedArray.getType 03-30 23:49:56.604
15105-15105/? W/dalvikvm: VFY: unable to resolve virtual method 524:
Landroid/content/res/TypedArray;.getType (I)I 03-30 23:49:56.604
15105-15105/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008 03-30
23:49:56.636 15105-15105/? I/dalvikvm: Could not find method
android.widget.FrameLayout.startActionModeForChild, referenced from
method
android.support.v7.widget.ActionBarContainer.startActionModeForChild
03-30 23:49:56.636 15105-15105/? W/dalvikvm: VFY: unable to resolve
virtual method 22329:
Landroid/widget/FrameLayout;.startActionModeForChild
(Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-30 23:49:56.640 15105-15105/? D/dalvikvm: VFY: replacing opcode
0x6f at 0x0002 03-30 23:49:56.640 15105-15105/? I/dalvikvm: Could not
find method android.content.Context.getColorStateList, referenced from
method
android.support.v7.content.res.AppCompatResources.getColorStateList
03-30 23:49:56.640 15105-15105/? W/dalvikvm: VFY: unable to resolve
virtual method 315: Landroid/content/Context;.getColorStateList
(I)Landroid/content/res/ColorStateList; 03-30 23:49:56.640
15105-15105/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 03-30
23:49:56.652 15105-15105/? I/dalvikvm: Could not find method
android.content.res.Resources.getDrawable, referenced from method
android.support.v7.widget.ResourcesWrapper.getDrawable 03-30
23:49:56.652 15105-15105/? W/dalvikvm: VFY: unable to resolve virtual
method 465: Landroid/content/res/Resources;.getDrawable
(ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 23:49:56.652 15105-15105/? D/dalvikvm: VFY: replacing opcode
0x6e at 0x0002 03-30 23:49:56.652 15105-15105/? I/dalvikvm: Could not
find method android.content.res.Resources.getDrawableForDensity,
referenced from method
android.support.v7.widget.ResourcesWrapper.getDrawableForDensity 03-30
23:49:56.652 15105-15105/? W/dalvikvm: VFY: unable to resolve virtual
method 467: Landroid/content/res/Resources;.getDrawableForDensity
(IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 23:49:56.652 15105-15105/? D/dalvikvm: VFY: replacing opcode
0x6e at 0x0002 03-30 23:49:56.660 15105-15105/? E/dalvikvm: Could not
find class 'android.graphics.drawable.RippleDrawable', referenced from
method
android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
03-30 23:49:56.660 15105-15105/? W/dalvikvm: VFY: unable to resolve
instanceof 150 (Landroid/graphics/drawable/RippleDrawable;) in
Landroid/support/v7/widget/AppCompatImageHelper; 03-30 23:49:56.660
15105-15105/? D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c 03-30
23:49:56.680 15105-15108/? D/dalvikvm: GC_CONCURRENT freed 234K, 22%
free 2639K/3364K, paused 1ms+2ms, total 9ms 03-30 23:49:56.692
15105-15105/? D/dalvikvm: GC_FOR_ALLOC freed 31K, 21% free
2676K/3364K, paused 3ms, total 3ms 03-30 23:49:56.692 15105-15105/?
I/dalvikvm-heap: Grow heap (frag case) to 3.506MB for 435468-byte
allocation 03-30 23:49:56.692 15105-15114/? D/dalvikvm: GC_FOR_ALLOC
freed 1K, 19% free 3100K/3792K, paused 3ms, total 3ms 03-30
23:49:56.700 15105-15108/? D/dalvikvm: GC_CONCURRENT freed 3K, 19%
free 3097K/3792K, paused 0ms+0ms, total 6ms 03-30 23:49:56.700
15105-15105/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 5ms 03-30
23:49:56.700 15105-15105/? I/dalvikvm-heap: Grow heap (frag case) to
3.821MB for 333408-byte allocation 03-30 23:49:56.704 15105-15114/? D/dalvikvm: GC_FOR_ALLOC freed <1K, 17% free 3422K/4120K, paused 4ms,
total 4ms 03-30 23:49:56.748 15105-15105/? D/libEGL: loaded
/system/lib/egl/libEGL_genymotion.so
[ 03-30 23:49:56.748 15105:15105 D/ ]
HostConnection::get() New Host Connection established 0xb85b25b0, tid 15105
[ 03-30 23:49:56.752 62: 62 D/ ]
Socket deconnection 03-30 23:49:56.756 15105-15105/? D/libEGL: loaded
/system/lib/egl/libGLESv1_CM_genymotion.so 03-30 23:49:56.756
15105-15105/? D/libEGL: loaded /system/lib/egl/libGLESv2_genymotion.so
03-30 23:49:56.804 15105-15105/? W/EGL_genymotion: eglSurfaceAttrib
not implemented 03-30 23:49:56.804 15105-15105/? E/OpenGLRenderer:
Getting MAX_TEXTURE_SIZE from GradienCache 03-30 23:49:56.812
15105-15105/? E/OpenGLRenderer: Getting MAX_TEXTURE_SIZE from
Caches::initConstraints() 03-30 23:49:56.812 15105-15105/?
D/OpenGLRenderer: Enabling debug mode 0 03-30 23:50:19.456
15105-15105/com.example.samsungvy277.myapp E/InputEventSender:
Exception dispatching finished signal. 03-30 23:50:19.456
15105-15105/com.example.samsungvy277.myapp E/MessageQueue-JNI:
Exception in MessageQueue callback: handleReceiveCallback 03-30
23:50:19.468 15105-15105/com.example.samsungvy277.myapp D/dalvikvm:
GC_FOR_ALLOC freed 806K, 30% free 3127K/4428K, paused 5ms, total 5ms
03-30 23:50:19.468 15105-15105/com.example.samsungvy277.myapp
E/MessageQueue-JNI: java.lang.IllegalStateException: Could not execute
method for android:onClick
at
android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
at android.view.View.performClick(View.java:4240)
at android.view.View.onKeyUp(View.java:7928)
at android.widget.TextView.onKeyUp(TextView.java:5606)
at android.view.KeyEvent.dispatch(KeyEvent.java:2647)
at android.view.View.dispatchKeyEvent(View.java:7343)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1933)
at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1408)
at android.app.Activity.dispatchKeyEvent(Activity.java:2384)
at
android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:541)
at
android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at
android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:319)
at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1860)
at
android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:3791)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3774)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3483)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406)
at
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3540)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3516)
at
android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3666)
at
android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:1982)
at
android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1698)
at
android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1689)
at
android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:1959)
at
android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:132)
at android.os.Looper.loop(Looper.java:124)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at an 03-30 23:50:19.468 15105-15105/com.example.samsungvy277.myapp
D/AndroidRuntime: Shutting down VM 03-30 23:50:19.472
15105-15105/com.example.samsungvy277.myapp W/dalvikvm: threadid=1:
thread exiting with uncaught exception (group=0xa4c2e648) 03-30
23:50:19.480 15105-15105/com.example.samsungvy277.myapp
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method for
android:onClick
at
android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
at android.view.View.performClick(View.java:4240)
at android.view.View.onKeyUp(View.java:7928)
at android.widget.TextView.onKeyUp(TextView.java:5606)
at android.view.KeyEvent.dispatch(KeyEvent.java:2647)
at android.view.View.dispatchKeyEvent(View.java:7343)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393)
at
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1933)
at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1408)
at android.app.Activity.dispatchKeyEvent(Activity.java:2384)
at
android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:541)
at
android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at
android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:319)
at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1860)
at
android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:3791)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3774)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3483)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406)
at
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3540)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3516)
at
android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3666)
at
android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:1982)
at
android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1698)
at
android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1689)
at
android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:1959)
at
android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:132)
at android.os.Looper.loop(Looper.java:124)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Met 03-30 23:50:22.504
15105-15105/? I/Process: Sending signal. PID: 15105 SIG: 9
Use findViewById after setting your setContentView(R.layout.activity_main)

Snackbar Not working on API 17

I am trying to use Snackbar from the support library but when I lunch the app on an emulator with an API below 21 , the app crush.
I think the support library will make the snackbar work on an older version , is that correct ?
Gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.user.test"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.2.0'
compile 'com.automationrockstars:design:1.0.3'
}
MainActivity.java
package com.example.user.test;
import android.support.design.widget.Snackbar;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
protected void onStart() {
super.onStart();
LinearLayout l = (LinearLayout) findViewById(R.id.linear1);
Snackbar snackbar = Snackbar.make(l,"Hello",Snackbar.LENGTH_LONG);
snackbar.show();
}
}
Edit (the logcat)
03-04 18:54:49.827 1468-1468/? D/dalvikvm: Late-enabling CheckJNI
03-04 18:54:49.911 1468-1474/? E/jdwp: Failed sending reply to debugger: Broken pipe
03-04 18:54:49.911 1468-1474/? D/dalvikvm: Debugger has detached; object registry had 1 entries
03-04 18:54:49.939 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
03-04 18:54:49.951 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20911: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
03-04 18:54:49.951 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.955 1468-1468/? W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
03-04 18:54:49.959 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20913: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20917: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 487: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
03-04 18:54:49.967 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 509: Landroid/content/res/TypedArray;.getType (I)I
03-04 18:54:49.967 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
03-04 18:54:50.059 1468-1468/? I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
03-04 18:54:50.059 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 21394: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-04 18:54:50.063 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
03-04 18:54:50.071 1468-1468/? I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
03-04 18:54:50.087 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 301: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
03-04 18:54:50.087 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
03-04 18:54:50.095 1468-1468/? I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
03-04 18:54:50.095 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 450: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-04 18:54:50.095 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:50.095 1468-1468/? I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
03-04 18:54:50.095 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 452: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-04 18:54:50.095 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:50.107 1468-1468/? E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
03-04 18:54:50.107 1468-1468/? W/dalvikvm: VFY: unable to resolve instanceof 146 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
03-04 18:54:50.107 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
03-04 18:54:50.187 1468-1471/? D/dalvikvm: GC_CONCURRENT freed 188K, 10% free 2682K/2980K, paused 2ms+1ms, total 62ms
03-04 18:54:50.187 1468-1468/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 57ms
03-04 18:54:50.187 1468-1468/? D/AndroidRuntime: Shutting down VM
03-04 18:54:50.187 1468-1468/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa61fe908)
03-04 18:54:50.191 1468-1468/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.user.test/com.example.user.test.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.support.design.widget.Snackbar.make(Snackbar.java:136)
at com.example.user.test.MainActivity.onStart(MainActivity.java:21)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1164)
at android.app.Activity.performStart(Activity.java:5114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2153)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 
at android.app.ActivityThread.access$600(ActivityThread.java:141) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:5041) 
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:793) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 
at dalvik.system.NativeStart.main(Native Method) 
try this code:
LinearLayout l;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
l = (LinearLayout) findViewById(R.id.linear1);
}
#Override
protected void onStart() {
super.onStart();
Snackbar snackbar = Snackbar.make(l,"Hello",Snackbar.LENGTH_LONG);
snackbar.show();
}
if that does not work create snackbar using: android.R.id.content
Snackbar.make(findViewById(android.R.id.content), "Hello", Snackbar.LENGTH_LONG).show();

Error in Displaying Maps Page in Android Studio

I am having a hard time debugging the main java class for my google maps page. I always got a not responding output whenever I run my application. Thank you for those who would answer.
Here is the java code for maps:
public class MapsActivity extends FragmentActivity {
private GoogleMap map;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
setUpMapIfNeeded();
}
#Override
protected void onResume() {
super.onResume();
setUpMapIfNeeded();
}
public void onSearch(View view) {
EditText location_tf = (EditText) findViewById(R.id.TFPickup);
String location = location_tf.getText().toString();
List<Address> addressList = null; //stores the list of address
if (location != null || !location.equals("")) {
Geocoder geocoder = new Geocoder(this);
try {
addressList = geocoder.getFromLocationName(location, 1);
} catch (IOException e) {
e.printStackTrace();
}
Address address = addressList.get(0); //stores lang and long
LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());
map.addMarker(new MarkerOptions().position(latLng).title("You are here!"));
map.animateCamera(CameraUpdateFactory.newLatLng(latLng));
}
}
private void setUpMapIfNeeded() {
if (map == null) {
// Try to obtain the map from the SupportMapFragment.
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap(); //creates map fragment //getmap- initializes map and view
// Check if we were successful in obtaining the map.
if (map != null) {
setUpMap();
}
}
}
private void setUpMap() {
map.addMarker(new MarkerOptions().position(new LatLng(0,0)).title("You are here!"));
map.setMyLocationEnabled(true); //see current location
}
}
Here is the xml file for the maps:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#android:color/background_dark"
android:weightSum="1">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/bg"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/header"
android:focusable="false"
android:id="#+id/header1"
android:layout_above="#+id/logo" />
<ImageView
android:layout_width="275dp"
android:layout_height="220dp"
android:src="#drawable/logo"
android:id="#+id/logo"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:text="Location"
android:textColor="#android:color/white"
android:textStyle="italic"
android:id="#+id/TFPickup"
android:layout_alignBottom="#+id/logo"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GO"
android:id="#+id/Bsearch"
android:layout_gravity="right"
android:onClick="onSearch"
android:layout_alignBottom="#+id/TFPickup"
android:layout_toRightOf="#+id/TFPickup"
android:layout_toEndOf="#+id/TFPickup" />
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="385dp"
android:layout_height="260dp"
android:id="#+id/map"
tools:context=".MapsActivity"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_below="#+id/logo"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageButton
android:layout_width="140dp"
android:layout_height="40dp"
android:src="#drawable/book_now"
android:id="#+id/book_now"
android:layout_below="#+id/map"
android:layout_centerHorizontal="true"
android:onClick="onClick1"/>
<SearchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Location"
android:layout_alignTop="#+id/map"
android:layout_centerHorizontal="true"
android:id="#+id/search"
/>
</RelativeLayout>
And here is the function to call the map activity page:
case R.id.bBook:
userLocalStore.getLoggedInUser();
userLocalStore.setUserLoggedIn(true);
startActivity(new Intent(this, MapsActivity.class));
break;
Here is the Manifest file which was requested:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.alienwarevin.loginregister" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.NoActionBar" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version">
</meta-data>
<meta-data
android:name="com.google.android.maps.v2.API_Key"
android:value="AIzaSyCCqPL_zo8vv_LUt6Y5rVD8vh8QijlYyaU">
</meta-data>
<activity
android:name=".SplashScreen"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Login"
android:label="#string/title_activity_login" >
</activity>
<activity
android:name=".Register"
android:label="#string/title_activity_register" >
</activity>
<activity android:name=".MainActivity"
android:label="Main"></activity>
<activity android:name=".MapsActivity"
android:label="MapsActivity">
</activity>
</application>
</manifest>
Here is the Logcat which was requested:
This results whenever I hit the book now button from the login page.
10-02 15:57:16.864 24679-24679/? D/dalvikvm﹕ Late-enabling CheckJNI
10-02 15:57:17.354 24679-24679/com.example.alienwarevin.loginregister D/ActivityThread﹕ setTargetHeapUtilization:0.25
10-02 15:57:17.354 24679-24679/com.example.alienwarevin.loginregister D/ActivityThread﹕ setTargetHeapIdealFree:8388608
10-02 15:57:17.354 24679-24679/com.example.alienwarevin.loginregister D/ActivityThread﹕ setTargetHeapConcurrentStart:2097152
10-02 15:57:18.544 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ GC_FOR_ALLOC freed 110K, 14% free 13109K/15107K, paused 17ms, total 17ms
10-02 15:57:18.574 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm-heap﹕ Grow heap (frag case) to 29.374MB for 8294416-byte allocation
10-02 15:57:18.624 24679-24681/com.example.alienwarevin.loginregister D/dalvikvm﹕ GC_CONCURRENT freed 1K, 9% free 21208K/23239K, paused 15ms+6ms, total 52ms
10-02 15:57:19.654 24679-24679/com.example.alienwarevin.loginregister D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so
10-02 15:57:19.694 24679-24679/com.example.alienwarevin.loginregister D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so
10-02 15:57:19.704 24679-24679/com.example.alienwarevin.loginregister D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so
10-02 15:57:19.714 24679-24679/com.example.alienwarevin.loginregister I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.107_msm8625_JB_REL_2.0.3_CL3357771_release_AU (CL3357771)
Build Date: 02/25/13 Mon
Local Branch:
Remote Branch: quic/jb_rel_2.0.3
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.107 + NOTHING
10-02 15:57:20.484 24679-24679/com.example.alienwarevin.loginregister D/OpenGLRenderer﹕ Enabling debug mode 0
10-02 15:57:22.514 24679-24681/com.example.alienwarevin.loginregister D/dalvikvm﹕ GC_CONCURRENT freed 3659K, 20% free 23707K/29319K, paused 12ms+3ms, total 88ms
10-02 15:57:22.614 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawable
10-02 15:57:22.624 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 577: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
10-02 15:57:22.624 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
10-02 15:57:22.624 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawableForDensity
10-02 15:57:22.624 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 579: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
10-02 15:57:22.624 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 614: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 636: Landroid/content/res/TypedArray;.getType (I)I
10-02 15:57:22.674 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
10-02 15:57:23.224 24679-24679/com.example.alienwarevin.loginregister E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-02 15:57:23.224 24679-24679/com.example.alienwarevin.loginregister E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 243: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x00c2
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve instance field 18
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x54 at 0x00e1
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve check-cast 25 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x000e
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 539: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
10-02 15:57:33.574 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000b
10-02 15:57:33.594 24679-24679/com.example.alienwarevin.loginregister I/zzy﹕ Making Creator dynamically
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.kz.a
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve check-cast 36 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/kz;
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0010
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.kz.a
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 446: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
10-02 15:57:33.774 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000d
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.kz.b
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve virtual method 155: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
10-02 15:57:33.784 24679-
24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0206
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister I/dalvikvm﹕ DexOpt: access denied from Lcom/google/android/gms/common/kz; to field Landroid/app/Notification;.extras
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve instance field 27
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x54 at 0x0225
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.kz.j
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ VFY: unable to resolve check-cast 245 (Landroid/os/UserManager;) in Lcom/google/android/gms/common/kz;
10-02 15:57:33.784 24679-24679/com.example.alienwarevin.loginregister D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x000e
10-02 15:57:33.804 24679-24679/com.example.alienwarevin.loginregister D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.maps from APK /data/data/com.google.android.gms/app_chimera/chimera-module-root/module-d6493fd1739bd078c31af6d7054443fe0541820e/MapsModule.apk
10-02 15:57:33.804 24679-24679/com.example.alienwarevin.loginregister D/ChimeraModuleLdr﹕ Loading module APK /data/data/com.google.android.gms/app_chimera/chimera-module-root/module-d6493fd1739bd078c31af6d7054443fe0541820e/MapsModule.apk
10-02 15:57:33.864 24679-24679/com.example.alienwarevin.loginregister D/ChimeraFileApk﹕ Primary ABI of requesting process is armeabi-v7a
10-02 15:57:33.864 24679-24679/com.example.alienwarevin.loginregister D/ChimeraFileApk﹕ Classloading successful, but code may not be optimized. It will either run in fallback (interpreted mode) or the odex has been found and isDexOptNeeded is misreporting a failure.
10-02 15:57:34.004 24679-24679/com.example.alienwarevin.loginregister I/Google Maps Android API﹕ Google Play services client version: 7895000
10-02 15:57:34.004 24679-24679/com.example.alienwarevin.loginregister I/Google Maps Android API﹕ Google Play services package version: 8115034
10-02 15:57:34.014 24679-24679/com.example.alienwarevin.loginregister D/AndroidRuntime﹕ Shutting down VM
10-02 15:57:34.014 24679-24679/com.example.alienwarevin.loginregister W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x4135a438)
10-02 15:57:34.044 24679-24679/com.example.alienwarevin.loginregister E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.alienwarevin.loginregister/com.example.alienwarevin.loginregister.MapsActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2114)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139)
at android.app.ActivityThread.access$700(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4960)
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:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:710)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:318)
at android.app.Activity.setContentView(Activity.java:1925)
at com.example.alienwarevin.loginregister.MapsActivity.onCreate(MapsActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5203)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2078)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139)
            at android.app.ActivityThread.access$700(ActivityThread.java:143)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4960)
            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:1038)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.geo.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
at com.google.maps.api.android.lib6.c.ad.a(Unknown Source)
at com.google.maps.api.android.lib6.a.e.a(Unknown Source)
These results whenever I hit the Book now button in the Login page.
Geocoder geocoder = new Geocoder(this);
should be
Geocoder geocoder = new Geocoder(getActivity());

NoClassDefFoundError: android.support.v7.app.ActionBarActivity

I keep getting java.lang.NoClassDefFoundError: android.support.v7.app.ActionBarActivityDelegate error for the last two days and I am going to hate android, it it keeps going like this. I am really hopeless. I am adding goseamless api and I get this error just after the
superOnCreate method on this line of code
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
it gives the error below while it is trying to set contentView
. But if I dont add it , the app builds without a problem.
This is the stack trace
07-27 15:10:18.130 814-814/com.fourspan.ekmobi I/System.out﹕ debugger has settled (1365)
07-27 15:10:18.180 814-814/com.fourspan.ekmobi V/HwPolicyFactory﹕ : success to get AllImpl object and return....
07-27 15:10:18.210 814-814/com.fourspan.ekmobi V/HwWidgetFactory﹕ : successes to get AllImpl object and return....
07-27 15:10:19.450 814-814/com.fourspan.ekmobi D/dalvikvm﹕ threadid=1: still suspended after undo (sc=1 dc=1)
07-27 15:10:31.590 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegateJBMR2', referenced from method android.support.v7.app.ActionBarActivityDelegate.createDelegate
07-27 15:10:31.590 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1269 (Landroid/support/v7/app/ActionBarActivityDelegateJBMR2;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.590 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0006
07-27 15:10:31.590 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegateJB', referenced from method android.support.v7.app.ActionBarActivityDelegate.createDelegate
07-27 15:10:31.590 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1268 (Landroid/support/v7/app/ActionBarActivityDelegateJB;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.590 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0012
07-27 15:10:31.600 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegateICS', referenced from method android.support.v7.app.ActionBarActivityDelegate.createDelegate
07-27 15:10:31.600 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1267 (Landroid/support/v7/app/ActionBarActivityDelegateICS;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.600 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x001e
07-27 15:10:31.600 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegateHC', referenced from method android.support.v7.app.ActionBarActivityDelegate.createDelegate
07-27 15:10:31.600 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1266 (Landroid/support/v7/app/ActionBarActivityDelegateHC;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.600 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x002a
07-27 15:10:31.600 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegateBase', referenced from method android.support.v7.app.ActionBarActivityDelegate.createDelegate
07-27 15:10:31.600 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1265 (Landroid/support/v7/app/ActionBarActivityDelegateBase;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.600 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0030
07-27 15:10:31.600 814-814/com.fourspan.ekmobi E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegate$ActionBarDrawableToggleImpl', referenced from method android.support.v7.app.ActionBarActivityDelegate.getDrawerToggleDelegate
07-27 15:10:31.600 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve new-instance 1263 (Landroid/support/v7/app/ActionBarActivityDelegate$ActionBarDrawableToggleImpl;) in Landroid/support/v7/app/ActionBarActivityDelegate;
07-27 15:10:31.600 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-27 15:10:31.610 814-814/com.fourspan.ekmobi W/dalvikvm﹕ VFY: unable to resolve static field 2683 (ActionBarWindow) in Landroid/support/v7/appcompat/R$styleable;
07-27 15:10:31.610 814-814/com.fourspan.ekmobi D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x0004
07-27 15:10:31.610 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2523 at 0x08 in Landroid/support/v7/app/ActionBarActivityDelegate;.createDelegate
07-27 15:10:31.610 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2522 at 0x14 in Landroid/support/v7/app/ActionBarActivityDelegate;.createDelegate
07-27 15:10:31.610 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2521 at 0x20 in Landroid/support/v7/app/ActionBarActivityDelegate;.createDelegate
07-27 15:10:31.610 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2520 at 0x2c in Landroid/support/v7/app/ActionBarActivityDelegate;.createDelegate
07-27 15:10:31.620 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x251f at 0x32 in Landroid/support/v7/app/ActionBarActivityDelegate;.createDelegate
07-27 15:10:31.620 814-814/com.fourspan.ekmobi D/dalvikvm﹕ DexOpt: unable to opt direct call 0x24fe at 0x03 in Landroid/support/v7/app/ActionBarActivityDelegate;.getDrawerToggleDelegate
07-27 15:10:31.620 814-814/com.fourspan.ekmobi D/AndroidRuntime﹕ Shutting down VM
07-27 15:10:31.620 814-814/com.fourspan.ekmobi W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41f58c50)
07-27 15:10:31.630 814-814/com.fourspan.ekmobi E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.fourspan.ekmobi, PID: 814
java.lang.NoClassDefFoundError: android.support.v7.app.ActionBarActivityDelegateJBMR2
at android.support.v7.app.ActionBarActivityDelegate.createDelegate(ActionBarActivityDelegate.java:48)
at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:96)
at com.fourspan.ekmobi.SplashScreenActivity.onCreate(SplashScreenActivity.java:18)
at android.app.Activity.performCreate(Activity.java:5286)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2319)
at android.app.ActivityThread.access$1100(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1232)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5253)
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:939)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
at dalvik.system.NativeStart.main(Native Method)
07-27 15:12:46.750 814-814/com.fourspan.ekmobi I/Process﹕ Sending signal. PID: 814 SIG: 9
Also here is my buildGraddle for app
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion 22.0.1
defaultConfig {
minSdkVersion 16
targetSdkVersion 21
multiDexEnabled true
}
dexOptions {
//incremental true
javaMaxHeapSize "2048M"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
maven {
url "http://maven.seamlessapi.com:8081/nexus/content/repositories/releases/"
}
}
dependencies {
compile files('libs/picasso-2.5.2.jar')
compile project(':Libraries:CropImageLib')
compile project(':Libraries:facebook-android')
compile project(':Libraries:NineOldLibs')
compile project(':Libraries:SlidingMenu')
compile files('libs/JTransforms-3.0.jar')
compile files('libs/JLargeArrays-1.2.jar')
compile files('libs/gdata-core-1.0.jar')
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:support-v4:18.0.+'
compile 'com.android.support:appcompat-v7:18.0.+'
compile 'com.goseamless:seamless:2.4.0'
}
let me know if you need more info
please help, Regards.
Android version 22.1.0, the class ActionBarActivity is deprecated. You should use AppCompatActivity
Since you are using com.android.support:appcompat-v7:18.0 you should replace the depracated ActionBarActivity with AppCompatActivity.

Categories

Resources