Re: [android-developers] error on lollipop, in kitkat works
Il giorno sabato 20 febbraio 2016 12:21:06 UTC+1, Christian Cortese ha scritto: > > > > Il giorno sabato 20 febbraio 2016 11:49:22 UTC+1, Christian Cortese ha > scritto: >> >> >> >> Il giorno giovedì 18 febbraio 2016 23:49:47 UTC+1, TreKing ha scritto: >>> >>> >>> On Thu, Feb 18, 2016 at 6:10 AM, Christian Cortese < >>> christian@gmail.com> wrote: >>> >>>> but i have a problem...on kitkat it works well, in lollipop i can't see >>>> the menu toolbar and when i click on a contact the app crashes with a >>>> nullpointerexception >>> >>> >>> Sounds like the action bar is disabled on Lollipop. Check your app >>> theme. You might have something in values-21/styles.xml that disables the >>> default action bar in order to use a Toolbar instead. >>> >>> >>> - >>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >>> transit tracking app for Android-powered devices >>> >> >> >> >> how can i get the code of styles.xml in values-21?? >> in android studio i have only values folder the values 21 folder dosen't >> exists >> > i've find the values 21 this is what contains <item name="android:windowContentTransitions">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item> <item name="android:windowSharedElementEnterTransition">@android:transition/move</item> <item name="android:windowSharedElementExitTransition">@android:transition/move</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@color/primary_darker</item> <item name="android:windowContentTransitions">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item> <item name="android:windowSharedElementEnterTransition">@android:transition/move</item> <item name="android:windowSharedElementExitTransition">@android:transition/move</item> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorAccent">@color/accent</item> <item name="android:windowBackground">@color/primary</item> <item name="colorControlNormal">@color/iron</item> <item name="colorControlActivated">@color/white</item> <item name="colorControlHighlight">@color/white</item> <item name="android:textColorHint">@color/iron</item> <item name="colorButtonNormal">@color/primary_darker</item> <item name="android:colorButtonNormal">@color/primary_darker</item> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/1ba0fd6a-8af8-42e7-84b8-e9f5b1bf126c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] error on lollipop, in kitkat works
Il giorno sabato 20 febbraio 2016 11:49:22 UTC+1, Christian Cortese ha scritto: > > > > Il giorno giovedì 18 febbraio 2016 23:49:47 UTC+1, TreKing ha scritto: >> >> >> On Thu, Feb 18, 2016 at 6:10 AM, Christian Cortese < >> christian@gmail.com> wrote: >> >>> but i have a problem...on kitkat it works well, in lollipop i can't see >>> the menu toolbar and when i click on a contact the app crashes with a >>> nullpointerexception >> >> >> Sounds like the action bar is disabled on Lollipop. Check your app theme. >> You might have something in values-21/styles.xml that disables the default >> action bar in order to use a Toolbar instead. >> >> >> - >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> > > > > how can i get the code of styles.xml in values-21?? > in android studio i have only values folder the values 21 folder dosen't > exists > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/72151ad2-e66d-41ae-894a-f4b24f356a97%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] error on lollipop, in kitkat works
Il giorno giovedì 18 febbraio 2016 23:49:47 UTC+1, TreKing ha scritto: > > > On Thu, Feb 18, 2016 at 6:10 AM, Christian Cortese < > christian@gmail.com > wrote: > >> but i have a problem...on kitkat it works well, in lollipop i can't see >> the menu toolbar and when i click on a contact the app crashes with a >> nullpointerexception > > > Sounds like the action bar is disabled on Lollipop. Check your app theme. > You might have something in values-21/styles.xml that disables the default > action bar in order to use a Toolbar instead. > > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > how can i get the code of styles.xml in values-21?? in android studio i have only values folder -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/1522b16e-46f4-4166-ac60-eeba1d10df7f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: error on lollipop, in kitkat works
Il giorno giovedì 18 febbraio 2016 13:10:38 UTC+1, Christian Cortese ha scritto: > > Hello > > i'm doing an app and i have included this code > http://developer.android.com/training/contacts-provider/retrieve-names.html > > but i have a problem...on kitkat it works well, in lollipop i can't see > the menu toolbar and when i click on a contact the app crashes with a > nullpointerexception > *void.android.app.actionbar.setdisplayhomeasupenabled(boolean) etc* > in this portion of code: > > if (Utils.hasHoneycomb()) { > // Enables action bar "up" navigation > getActionBar().setDisplayHomeAsUpEnabled(true); > > > } > > > how can i resolve this?? > > thanks for all > > this is the exception on Lollipop 02-18 13:41:15.304 31435-31435/todonotes.com.todonotes_buildfinale E/AndroidRuntime: FATAL EXCEPTION: main Process: todonotes.com.todonotes_buildfinale, PID: 31435 java.lang.RuntimeException: Unable to start activity ComponentInfo{todonotes.com.todonotes_buildfinale/todonotes.com.todonotes_buildfinale.ContactDetailActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2378) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2440) at android.app.ActivityThread.access$800(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1348) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5422) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference at todonotes.com.todonotes_buildfinale.ContactDetailActivity.onCreate(ContactDetailActivity.java:59) at android.app.Activity.performCreate(Activity.java:6057) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2440) at android.app.ActivityThread.access$800(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1348) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135)
[android-developers] error on lollipop, in kitkat works
Hello i'm doing an app and i have included this code http://developer.android.com/training/contacts-provider/retrieve-names.html but i have a problem...on kitkat it works well, in lollipop i can't see the menu toolbar and when i click on a contact the app crashes with a nullpointerexception *void.android.app.actionbar.setdisplayhomeasupenabled(boolean) etc* in this portion of code: if (Utils.hasHoneycomb()) { // Enables action bar "up" navigation getActionBar().setDisplayHomeAsUpEnabled(true); } how can i resolve this?? thanks for all -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/dcf71b59-db4e-4519-8723-70239c1de64e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.