Buongiorno qualcuno potrebbe aiutarmi… ho un file .aia ( che e dello stesso formato di un file .zip) dovrei all'interno di questa directori (youngandroidproject/project.properties) eliminare la penultima linea…di questo file:
#
#Fri Jul 07 08:23:34 UTC 2023
showlistsasjson=False
minSdk=21
main=io.kodular.glak_kodular_comunity.Web_Files_New.Screen1
packagename=web_file.app
color.accent=&HFFFF4081
receiveSharedText=text,audio,video,image,
sizing=Responsive
screenNames=Screen1
color.primary.dark=&HFF303F9F
build=../build
source=../src
useslocation=False
splashEnabled=False
color.primary=&HFF3F51B5
assets=../assets
versionname=1.0
icon=INFO.png
aname=Web_Files
versioncode=1
theme=AppTheme
rtlSupport=False
projectColors=[{"hexa"\:"FFFFFFFF","freq"\:"3"},{"hexa"\:"CCDB39FF","freq"\:"1"},{"hexa"\:"FEC007FF","freq"\:"1"},{"hexa"\:"673AB7FF","freq"\:"1"}]
name=Web_Files_New
devo eliminarela penultima linea:
Questa (projectColors=[{"hexa"\:"FFFFFFFF","freq"\:"3"},{"hexa"\:"CCDB39FF","freq"\:"1"},{"hexa"\:"FEC007FF","freq"\:"1"},{"hexa"\:"673AB7FF","freq"\:"1"}])
ho fatto un codice ma non la elimina del tutto rimane qualcosa….
con questo codice…
Sub Pulisci_File(ByVal F As String)
Using zippedFile As ZipArchive = ZipFile.Open(F, ZipArchiveMode.Update)
Dim entryPath As String = "youngandroidproject/project.properties"
''"youngandroidproject/project.properties"
Dim ntry As ZipArchiveEntry = zippedFile.GetEntry(entryPath)
Dim sr As New StreamReader(ntry.Open, Encoding.UTF8)
Dim l As New List(Of String)
Do
Dim R = sr.ReadLine
l.Add(sr.ReadLine)
Loop Until sr.EndOfStream
sr.Close()
Dim sw As New StreamWriter(ntry.Open, Encoding.UTF8)
Dim lunghezza As Long
For Each s As String In l
If Not s.StartsWith("""projectColors") Then
sw.WriteLine(s)
End If
lunghezza += s.Length
Next
sw.Close()
ntry.Open().SetLength(lunghezza)
End Using
End Sub