Android Question ClassNotFoundException


Active Member
Licensed User
Longtime User

i use this Modul (ZipManager, with Inline Java) to Zip the Files before upload to Google Drive:

now a user and Firebase Report a Crash. The Main reason/error is:
Caused by java.lang.ClassNotFoundException
Didn't find class "$ResumableSub_upload_Backup" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/"],nativeLibraryDirectories=[/data/app/, /system/lib64, /vendor/lib64]]
dalvik.system.BaseDexClassLoader.findClass (
(if you Need more Error Message vom CrashAnalyics, or Code, let me know)

Device is a Samsung with Android 9 (on my Device with Android 9, and lower, all fine)

what is the reason and what can i do to fix it?


Active Member
Licensed User
Longtime User
Sub Process_Globals
    Dim FileList_Backup As List
    Dim FileList_Backup_Archiv As List
    Dim FileList_Backup_Remote As Map
    Dim FileList_Backup_Remote_Archiv As Map

FileList_Backup_Remote, hold the Name and ID from the Files in the Google Drive
FileList_Backup & FileList_Backup_Archiv hold the Phat and Name from the local Files to Upload

Sub upload_Backup"upload_Backup")
    varSize=FileList_Backup.Size + FileList_Backup_Archiv.Size

    For i=0 To FileList_Backup.Size-1
        varCounter=i + 1
        varDrive_qDatei = FileList_Backup.Get(i)
        varReturn_FileFound_ID =""
        Dim erweiterung As String
        If varDrive_qDatei.Contains(".zip") Then
        End If
        If FileList_Backup_Remote.ContainsKey(varDrive_qDatei & erweiterung)=True Then
  "* Datei Remote")
            varDrive_zFileID=FileList_Backup_Remote.Get(varDrive_qDatei & erweiterung)
  "* Datei new")
        End If"Upload_File_to_Google, File: " & varDrive_qPhath & "/" & varDrive_qDatei)
        GDrive.UploadFile(varDrive_qDatei & erweiterung,varDrive_qPhath,varDrive_qDatei,varDrive_zPhath_ID,varDrive_zFileID)
        wait for Drive_FileUploaded(FileID As String)
End Sub

Upload the File to Google Part:
'Upload a file to Google Drive
'Name       - The Name of the filename (Name at Google Drive)
'UploadDir  - The (local) folder of the upload file.
'UploadFile - Filename (local) of the upload file
'FileID     - The file ID on Google Drive. If not known, a new file will created.
'Events : FileUploadDone(FileID as string)
'Update einbauen/Testen
'Parrent testen
Sub UploadFile(Name As String, LocalDir As String, LocalFilename As String, Parrent As String, FileId As String)"-------------------")"GoogleDrive, UploadFile")

    Dim data() As Byte

    If Name = "" Then Name = LocalFilename"LocalDir:" & LocalDir)"LocalFilename:" & LocalFilename)"Parent:" & Parrent)"FileID:" & FileId)
        Dim h_ul As HttpJob
        If FileId = "" Then
  "Upload w/o File ID (create new File)")
            'Create the stream
            Dim boundary As String = "foo_bar_baz"
            Dim ContentType As String = "application/octet-stream"
            Dim EOL As String= Chr(13) & Chr(10)

            Dim In As InputStream = File.OpenInput(LocalDir, LocalFilename)
            Dim out2 As OutputStream

            Dim m As Map
            m.Put("name", Name)
            If Parrent <>"" Then m.Put("parents",Array As String(Parrent))

            Dim Jg As JSONGenerator

            'The first half of the POST contains the JSON data AND the Content Type from above.
            Dim RR As String = "--" & boundary & EOL & _
                            "Content-Type: application/json; charset=UTF-8" & EOL & EOL & _
                            Jg.ToString & EOL & EOL & _
                            "--" & boundary & EOL & _
                            "Content-Type: " & ContentType & EOL & EOL
            data = (RR).GetBytes("UTF-8")
            out2.WriteBytes(data, 0, data.Length)                            'Write it To the Stream.
            File.Copy2(In, out2)                                            'Add the File itself To the Stream.
            data = (EOL & EOL & "--" & boundary & "--").GetBytes("UTF-8")    'Add the final boundary to the POST
            out2.WriteBytes(data, 0, data.Length)                            'Write it To the Stream Then make the Bytes the complete Stream.
            data = out2.ToBytesArray
            h_ul.PostBytes("", data)
            h_ul.GetRequest.SetContentType("multipart/related; boundary=" & boundary)
            h_ul.GetRequest.SetHeader("Authorization", "Bearer " & myAccessToken)
  "Upload mit File ID (File Content Update)")
            'Create a new stream
            Dim OutUpdate As OutputStream
            Dim InUpate As InputStream = File.OpenInput(LocalDir, LocalFilename)
            OutUpdate.InitializeToBytesArray(1000)            'Initialize the stream
            File.Copy2(InUpate, OutUpdate)                    'Copy the filestream in the output stream
            data = OutUpdate.ToBytesArray                    'Fill export data array
            h_ul.PatchBytes("" & "/" & FileId & "?uploadType=media", data)
            h_ul.getrequest.SetHeader("Authorization", "Bearer " & myAccessToken)
        End If

        wait For (h_ul) JobDone(h_ul As HttpJob)

        If h_ul.Success Then
  "Upload File Success")
            Dim j As JSONParser
            Dim Map1 As Map
            Map1 = J.NextObject
        End If

    Catch"GoogleUpload File Error")
        Dim writer As TextWriter
        writer.WriteLine(LocalFilename & ", " & LastException.Message)
    End Try
    CallSubDelayed2(evModule, evName & "_FileUploaded", FileId)
End Sub
Upvote 0


Active Member
Licensed User
Longtime User
This code is not needed. HttpJob has built-in support for multipart requests.
now, i know (and use it for new cases). i have write this code a view years before and it works.

This is a strange error. If there is only a single report of this error then you should probably ignore it for now.
Yes, at the moment it is a single Report (1 User/Device, a view times). I will see what will happen in the future.

many thanks for view/help
Upvote 0