Android Question Dropboxv2 0.65 Link error : Failed resolution of: Lkotlin/jvm/internal/Intrinsics

Juan Vargas (Bioagro)

Member
Licensed User
This kind of errors scares me, dont know where to begin....

B4X:
available Memory = 357.7372741699219 MB
No wakelock.
available Memory = 357.7372741699219 MB
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
    at com.dropbox.core.android.Auth$Companion.startOAuth2Authentication(Unknown Source:2)
    at com.dropbox.core.android.Auth.startOAuth2Authentication(Unknown Source:2)
    at de.donmanfred.dbxv2.AuthWrapper.startOAuth2Authentication(AuthWrapper.java:35)
    at com.tropic.invoice.main._btnrestoredropbox_click(main.java:47820)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:7465)
    at android.view.View.performClickInternal(View.java:7442)
    at android.view.View.access$3600(View.java:813)
    at android.view.View$PerformClick.run(View.java:28394)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:250)
    at android.app.ActivityThread.main(ActivityThread.java:7803)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    ... 24 more
 

DonManfred

Expert
Licensed User
Longtime User
upload a small project which shows the issue.
It does not happen here
 
Upvote 0

Juan Vargas (Bioagro)

Member
Licensed User
Here the main code for the test

Test Dropboxv2 Crash:
#Region  Project Attributes
    #ApplicationLabel: DB Test
    #VersionCode: 1
    #VersionName: 1 (2023)
    #SupportedOrientations: portrait
   
    #AdditionalJar:dropbox-android-sdk-6.0.0.aar
    #AdditionalJar:dropbox-core-sdk-6.0.0
    #AdditionalJar: androidx.legacy:legacy-support-core-utils
    #AdditionalJar: jackson-core-2.7.4.jar
    #MultiDex: true
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: False
    #FullScreen: False
    #IncludeTitle: False
    #DebuggerForceFullDeployment: True
#End Region

Sub Process_Globals

    Dim token As String
    Dim clientDbx As DbxClientV2
    Dim configDbx As DbxRequestConfig
    Dim dbxFiles As DbxUserFilesRequests
    Dim dbxSharing As DbxUserSharingRequests
    Dim dbxUsers As DbxUserUsersRequests
    Dim clientId As String
    Dim AccessToken As String

End Sub

Sub globals
    Private auth As DbxAuth
    Dim configDbx As DbxRequestConfig
    Private BtnBackupDropBox As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("testdbv2") 'has only a button
    configDbx.Initialize("","clientidentifier","de-de",5) ' de-de is my locale
    auth.Initialize("yourappkey")
End Sub

Sub Activity_Resume
        If auth.OAuth2Token <> Null Then
            If auth.OAuth2Token <> "" Then
                token = auth.OAuth2Token
                Dim cred As DbxCredential  = auth.DbxCredential
               
                Log($"cred.AccessToken: ${cred.AccessToken}"$)
                Log($"cred.aboutToExpire: ${cred.aboutToExpire}"$)
                Log($"cred.ExpiresAt: ${cred.ExpiresAt}"$)
                Log($"cred.RefreshToken: ${cred.RefreshToken}"$)
                Log("Token available. Dropbox enabled")
                Log("Token "&token)
                Starter.kvs.Put("dbxtokenv2", token)
                Dim dbxhost As DbxHost
                dbxhost.Initialize
                clientDbx.Initialize("Dropbox",configDbx,token,dbxhost)
                dbxFiles = clientDbx.files
                dbxFiles.setEventname("dbxFiles")
                dbxSharing = clientDbx.sharing
                dbxSharing.setEventname("dbxSharing")
                dbxUsers = clientDbx.users
                dbxUsers.setEventname("dbxUsers")
                dbxUsers.CurrentAccount
            Else
                Log($"Token = """$)
            End If
        Else
            Log("OAuth2Token is null. This is usually OK. Do not log it. t will only become not null after you start a Authentification flow...")
        End If
End Sub

Sub BtnBackupDropBox_Click
    auth.Initialize("clientid")
    auth.startOAuth2Authentication ' here crash with error
        'java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
        '    at com.dropbox.core.android.Auth$Companion.startOAuth2Authentication(Unknown Source:2)
        '    at com.dropbox.core.android.Auth.startOAuth2Authentication(Unknown Source:2)
        ' at de.donmanfred.dbxv2.AuthWrapper.startOAuth2Authentication(AuthWrapper.java:35)
       
End Sub

Sub ResultadoToken(lToken As String)
    token = lToken
    configDbx.Initialize("","mifkq3tp0ieeubm","",5)
    Dim dbxhost As DbxHost
    dbxhost.Initialize
    clientDbx.Initialize("Dropbox",configDbx,token,dbxhost)
    If clientDbx.auth.IsInitialized Then
       
    End If
    dbxFiles = clientDbx.files
    dbxFiles.setEventname("dbxFiles")
    dbxSharing = clientDbx.sharing
    dbxSharing.setEventname("dbxSharing")
    dbxUsers = clientDbx.users
    dbxUsers.setEventname("dbxUsers")

    Starter.kvs.Put("tokendb", token)
    Log("Token es-2 : " & token)
End Sub

Sub Lbl_DropBoxHacerBackup_Click
   
End Sub


Sub dropbox_JobStatus (meta As Map)
    Log(meta)
End Sub

Sub dbxSharing_listFolders(success As Boolean, folders As List, error As String)
    Log($"dbxSharing_listFolders(${success}, ${folders.Size}, ${error})"$)
    If folders.Size > 0 Then
        For i = 0 To folders.Size-1
            Dim meta As SharedFolderMetadata = folders.Get(i)
            Log(meta.toString)
        Next
    End If
End Sub
Sub dbxSharing_AddFileMember(success As Boolean, members As List, error As String)
    Log($"dbxSharing_listFolders(${success}, ${members.Size}, ${error})"$)
End Sub
Sub dbxSharing_listMountableFolders(success As Boolean, folders As List, error As String)
    Log($"dbxSharing_listFolders(${success}, ${folders.Size}, ${error})"$)
End Sub
Sub dbxSharing_listReceivedFiles(success As Boolean, receivedFiles As List, error As String)
    Log($"dbxSharing_listFolders(${success}, ${receivedFiles.Size}, ${error})"$)
   
End Sub
Sub dbxSharing_listSharedLinks(success As Boolean, sharedLinks As List, error As String)
    Log($"dbxSharing_listFolders(${success}, ${sharedLinks.Size}, ${error})"$)
End Sub
Sub dbxSharing_SharedFolderMetadata(success As Boolean, meta As SharedFolderMetadata, error As String)
    Log($"dbxSharing_listFolders(${success}, ${meta.toString}, ${error})"$)

End Sub

Sub dbxFiles_CopyBatch(success As Boolean, meta As Map, error As String)
   
End Sub
Sub dbxFiles_CopyBatchCheck(success As Boolean, meta As Map, error As String)
   
End Sub
Sub dbxFiles_CopyReference(metainfo As Map)
   
End Sub
Sub dbxFiles_ListRevisions(success As Boolean, meta As Map, error As String)
   
End Sub
Sub dbxFiles_MoveBatch(success As Boolean, meta As Map, error As String)
   
End Sub
Sub dbxFiles_MoveBatchCheck(success As Boolean, meta As Map, error As String)
   
End Sub
Sub dbxFiles_Restore(success As Boolean, meta As FileMetadata, error As String)
   
End Sub
Sub dbxFiles_UploadFinished(success As Boolean, metaObj As Object, info As String, localpath As String, localfilename As String)
    Dim meta As FileMetadata = metaObj
    Log($"dbxFiles_UploadFinished(${success} Localpath ${localpath} -> Localfilename ${localfilename} -> ${meta})"$)
    Log($"dbxFiles_UploadFinished(${success} Info ${info})"$)

    If success=False Then
        Return
    End If

End Sub

Sub dbxUsers_getAccount(account As BasicAccount)
    Log($"dbxUsers_getAccount(${account})"$)
End Sub
Sub dbxUsers_getAccountBatch(batch As List)
   
End Sub
Sub dbxUsers_getCurrentAccount(account As FullAccount)
    Log($"dbxUsers_getCurrentAccount(${account})"$)
   
End Sub

Sub dbxFiles_listFolder(success As Boolean, entries As List, error As String)
End Sub


Sub dbxSharing_Error(lError As String)
End Sub

Sub dbxFiles_DownloadFinished(success As Boolean, meta As FileMetadata, error As String)
    Log($"dbxFiles_DownloadFinished(${success}, ${meta}, ${error})"$)

End Sub


Sub DropBox_UploadSessionStatus(session As Map)

End Sub

Sub DropBox_FileUpload (session As Map)
End Sub
Sub dropbox_FileSearch (result As Map)
   
End Sub
Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata, error As String)
        dbxFiles.CreateFolder("/tropicinvoicebackup/images_invoices",True)

End Sub

Sub DropBox_CurrentAccount(meta As Map)
    Log("Dropbox_CurrentAccount: "&meta)
End Sub


dbAuth:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private www As WebView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("dropboxauth")
    'Main.dbx.request_auth
End Sub

Sub Activity_Resume
    www.LoadUrl("https://www.dropbox.com/1/oauth2/authorize?client_id="& Main.clientID &"&response_type=token&redirect_uri=http://127.0.0.1/")

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub www_PageFinished (Url As String)
    Log($"www_PageFinished(${Url})"$)
    ' http://127.0.0.1/#access_token=ToZD0ArtpcUAAAAAAADb-4YF3VNuCQNZz_DK5B2cTcKI0qQAZBIU3z-EdizUT2bP&token_type=bearer&uid=189761154
   
End Sub
Sub Iniciar
   
End Sub
Sub www_OverrideUrl (Url As String) As Boolean
    Log($"www_OverrideUrl(${Url})"$)
    If Url.Contains("access_token=") Then
        ' Access Token available... Cut them off the url
        Dim token As String = Url.SubString2(Url.IndexOf("access_token=")+13,Url.IndexOf("&"))
        Log("Token found... Setting global var")
        Main.accesstoken = token
        Log($"Token "${token}" is set... Finishing activity now..."$)
        'Log(token)
        CallSubDelayed2(Main,"ResultadoToken",token)
        Activity.Finish
        Return False
    End If

End Sub
 
Upvote 0
Top