E Ellen Wu Member Licensed User Nov 29, 2019 #1 I am getting this error when I run the same code with the emulator on API platform 29 but no problem on API platform 28. The libraries those I used are - B4XPreferencesDialog version 1.71 - XUI Views version 2.17 - xCustomListView 1.70 *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** preferencesdialog_initialize (java line: 1170) java.lang.NoSuchFieldException: No field mColorStateList in class Landroid/graphics/drawable/GradientDrawable$GradientState; (declaration of 'android.graphics.drawable.GradientDrawable$GradientState' appears in /system/framework/framework.jar) at java.lang.Class.getDeclaredField(Native Method) at anywheresoftware.b4a.objects.B4XViewWrapper.getColor(B4XViewWrapper.java:388) at b4a.example3.customlistview._designercreateview(customlistview.java:305) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196) at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:67) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162) at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134) at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
I am getting this error when I run the same code with the emulator on API platform 29 but no problem on API platform 28. The libraries those I used are - B4XPreferencesDialog version 1.71 - XUI Views version 2.17 - xCustomListView 1.70 *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** preferencesdialog_initialize (java line: 1170) java.lang.NoSuchFieldException: No field mColorStateList in class Landroid/graphics/drawable/GradientDrawable$GradientState; (declaration of 'android.graphics.drawable.GradientDrawable$GradientState' appears in /system/framework/framework.jar) at java.lang.Class.getDeclaredField(Native Method) at anywheresoftware.b4a.objects.B4XViewWrapper.getColor(B4XViewWrapper.java:388) at b4a.example3.customlistview._designercreateview(customlistview.java:305) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196) at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:67) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162) at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134) at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2019 #2 Might be an emulator problem as B4XView.Color works properly on real Android 10 devices. Is this an emulator created with B4A Sdk Manager? Upvote 0
Might be an emulator problem as B4XView.Color works properly on real Android 10 devices. Is this an emulator created with B4A Sdk Manager?
E Ellen Wu Member Licensed User Nov 30, 2019 #3 Yes, the emulator was created with B4A tool. And my app doesn’t work on real Android 10 device, users told that the app crashed when first started. It only happened on Android 10. Upvote 0
Yes, the emulator was created with B4A tool. And my app doesn’t work on real Android 10 device, users told that the app crashed when first started. It only happened on Android 10.
Erel B4X founder Staff member Licensed User Longtime User Dec 1, 2019 #4 Can you upload the project? Or send it to [email protected]? Upvote 0
E Ellen Wu Member Licensed User Dec 3, 2019 #5 Erel said: Can you upload the project? Or send it to [email protected]? Click to expand... Erel, the project already sent to you. Thank you for your help. Upvote 0
Erel said: Can you upload the project? Or send it to [email protected]? Click to expand... Erel, the project already sent to you. Thank you for your help.
Erel B4X founder Staff member Licensed User Longtime User Dec 3, 2019 #6 It is related to targetSdkVersion. Don't set it to 29 for now. It should be 28. Upvote 0
Greg Breinholt Member Licensed User Longtime User Dec 10, 2019 #8 I had the same issue. Setting to 28 removed it. Upvote 0