German Seid B4A Version 9.8 habe ich nur Probleme!

Wolli013

Active Member
Licensed User
Wer kann mir helfen und sagen wo das Problem liegt.

Nach SDK Update...
Ich wollte auf Android 29 aufsteigen und habe die vorselektierten Einträge auch mit übernommen.
Am Ende der Installation kamen auch irgendwelche Warnhinweise die ich jetzt nicht mehr weiß.

Jetzt geht keine App mehr wo Appcompat mit intigriert ist.
Vorher lief alles wie gewohnt.

Ich habe mir zum testen den Beispielcode runter geladen von...
um zu überprüfen ob das Beispiel läuft.
Leider kommt auch hier die Fehlermeldung wie bei anderen Apps, wo Appcompat genutzt wird.
Das Programm lässt sich ohne Fehler installieren und wenn es gestartet wird stürtzt es ab.

Anbei die Fehler Log

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 344)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at b4a.example.main._activity_create(main.java:344)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7777)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 14 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar;
at b4a.example.main._globals(main.java:380)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.example.main.initializeGlobals(main.java:320)
at b4a.example.main.afterFirstLayout(main.java:101)
... 9 more
Caused by: java.lang.ClassNotFoundException: android.support.v7.widget.Toolbar
... 14 more
 

ernschd

Active Member
Licensed User
Poste mal deine Main-Activity (und bitte mit Code-Formatierung zwecks besserer Lesbarkeit).
 

Wolli013

Active Member
Licensed User
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#0098FF</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#AAAA00</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>
)
 

Wolli013

Active Member
Licensed User
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
    #Extends: android.support.v7.app.AppCompatActivity
    #BridgeLogger: True
Sub Process_Globals

End Sub

Sub Globals
    Private ACToolBarLight1 As ACToolBarLight
    Private ToolbarHelper As ACActionBar
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets, "smiley.png"))
    ACToolBarLight1.NavigationIconDrawable = bd
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = False 'set to true to show the up arrow
    ACToolBarLight1.InitMenuListener
End Sub

Sub ACToolBarLight1_NavigationItemClick
    Log("click1")
End Sub



Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 

DonManfred

Expert
Licensed User
1. Du compilierst gegen AndroidX?
2. Du hast AppCompat 4.0 (die neue Fassung incl. AndroidX Artifact)? Evtl. Appcompat 4. nochmal neu laden und einsetzen.
 

Wolli013

Active Member
Licensed User
Kann man diese Warnungen aus dem SDK Manager ignorieren?


WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/C:/Android/tools/bin/jaxb-impl-2.1.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 

Wolli013

Active Member
Licensed User
Leider funktionier es mit dem Sliding menue nicht.
hat einer einer Idee was fehlt?

crash Log:

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 363)
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewConfigurationCompat;
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.initCustomViewAbove(CustomViewAbove.java:167)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:157)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:152)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:209)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:192)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:181)
at anywheresoftware.b4a.objects.SlidingMenuWrapper.Initialize(SlidingMenuWrapper.java:26)
at b4a.example.main._activity_create(main.java:363)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7777)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Caused by: java.lang.ClassNotFoundException: android.support.v4.view.ViewConfigurationCompat
... 20 more




B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
    #Extends: android.support.v7.app.AppCompatActivity
    #BridgeLogger: True 
Sub Process_Globals

End Sub

Sub Globals
    Private ACToolBarLight1 As ACToolBarLight
    Private ToolbarHelper As ACActionBar
    Private sm As SlidingMenu
    Private ListView1 As ListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
    ToolbarHelper.UpIndicatorDrawable =  bd
    ACToolBarLight1.InitMenuListener
    sm.Initialize("sm")
    Dim offset As Int = 100dip
    sm.BehindOffset = offset
    sm.Mode = sm.LEFT
    Dim lftMenu As Panel
    lftMenu.Initialize("")
    sm.Menu.AddView(lftMenu, 0, 0, 100%x - offset, 100%y)
    lftMenu.LoadLayout("Left")
    For i = 1 To 30
        ListView1.AddSingleLine("Item " & i)
    Next
End Sub

Sub ACToolBarLight1_NavigationItemClick
    sm.ShowMenu
End Sub



Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Top