Android Question [Solved] StdActionBar error in Android 9 Pie

Discussion in 'Android Questions' started by Cebuvi, Feb 28, 2019.

  1. Cebuvi

    Cebuvi Active Member Licensed User

    Hello,

    Yesterday my smartphone (samsung S8) is updated to Android 9 Pie and applications that use the StdActionBar library give an error and stop.

    I have verified that this happens when in the manifest I have: "targetSdkVersion = "28". With targetSdkVersion = "23" , everything works correctly.

    This is the error that occurs:

    It's happening in an application that I have on Google Play. Can someone help me solve the problem?
    Thank you.
     
  2. DonManfred

    DonManfred Expert Licensed User

    you should not use 28 for now. Set it to max 26
     
    kisoft likes this.
  3. Cebuvi

    Cebuvi Active Member Licensed User

    Thank you very much for such a quick response.
    With max = 26 also works, I'll leave it like this until there's a definitive solution.
     
  4. Cebuvi

    Cebuvi Active Member Licensed User

    Hello
    I tested with the TabStripViewPager library and max = 28 and it does not work either.
    I'll wait.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    I'm unable to reproduce it. Can you upload the layout file that causes this issue with targetSdkVersion set to 28?
     
  6. Cebuvi

    Cebuvi Active Member Licensed User

    Hello

    I had a hard time isolating the problem, but I think I've located it. It is produced when loading a layout where there is a Mapfragment.

    With targetSdkVersion set to 26, no problem on Android 8 and android 9. When you switch to targetSdkVersion=28 everything works correctly on Android 8 and a virtual device like Genymotion with Android 9, but on an real S8 smartphone with Android 9 the app stops.

    I can't send you an example because the system tells me it's too big (9mb). How can I send it to you?

    Thank you
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    I see an error with Google Maps. It is different than the one from the first post. You need to add this to the manifest editor and it will work:
    Code:
    AddApplicationText(
    <uses-library
          android:name=
    "org.apache.http.legacy"
          android:required=
    "false" />
    )
     
    MarcoRome, asales, MAGAREY and 3 others like this.
  8. Cebuvi

    Cebuvi Active Member Licensed User

    Thank you Erel.

    The error message is not always the same. In the last test, there was not even an error log. The app stopped and nothing else.

    The text to be added to the manifest is always added or only when Google Maps is in TabStrip or StdViewPager?

    Thanks.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    It is only related to Google Maps and always needed with Google Maps (and targetSdkVersion = 28).
     
  10. Cebuvi

    Cebuvi Active Member Licensed User

    Thanks.
     
  11. vikingivesterled

    vikingivesterled Member Licensed User

    Now Google demands targetversion 28 for its playstore and I am getting the same error when running on my Samsung S10e Android version 9 at the spot of loading the layout, even if I add the recommended AddApplicationText to the manifest.
    Have tried it with 2 different apps.
    The map is anchored horisontally to both sides.
    If I say ok to continue when error comes up on screen, it displays the map in it's window in the initial worldwide stage of before I add points/lines and refocus it.

    Error below:

    reportupload_activity_create (java line: 462)
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot set 'scaleY' to Float.NaN
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at marineloggerplus.moonc.mobi.reportupload._activity_create(reportupload.java:462)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at marineloggerplus.moonc.mobi.reportupload.afterFirstLayout(reportupload.java:104)
    at marineloggerplus.moonc.mobi.reportupload.access$000(reportupload.java:17)
    at marineloggerplus.moonc.mobi.reportupload$WaitForLayout.run(reportupload.java:82)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7037)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
    Caused by: java.lang.IllegalArgumentException: Cannot set 'scaleY' to Float.NaN
    at android.view.View.sanitizeFloatPropertyValue(View.java:17006)
    at android.view.View.sanitizeFloatPropertyValue(View.java:16980)
    at android.view.View.setScaleY(View.java:16406)
    at android.animation.PropertyValuesHolder.nCallFloatMethod(Native Method)
    at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
    at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1387)
    at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:990)
    at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:674)
    at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:637)
    at android.animation.ValueAnimator.start(ValueAnimator.java:1069)
    at android.animation.ValueAnimator.start(ValueAnimator.java:1088)
    at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
    at android.animation.ValueAnimator.startWithoutPulsing(ValueAnimator.java:1081)
    at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1142)
    at android.animation.AnimatorSet.startAnimation(AnimatorSet.java:1227)
    at android.animation.AnimatorSet.start(AnimatorSet.java:729)
    at android.animation.AnimatorSet.start(AnimatorSet.java:684)
    at anywheresoftware.b4a.objects.ViewWrapper.AnimateFrom(ViewWrapper.java:461)
    at anywheresoftware.b4a.keywords.LayoutBuilder.animateLayout(LayoutBuilder.java:191)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:165)
    ... 14 more
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot set 'scaleY' to Float.NaN
    ** Activity (reportupload) Resume **
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    You should start a new thread and upload a project that demonstrates the issue.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice