我已经尝试了一切来解决这个问题,但我仍然不能。这是可能导致问题的build.gradle:app部分:
NDK_TOOLCHAIN_VERSION := 4.9 ( was 4.8)
我也改变了这个:
ndk.dir=C:\Users\Elyes\AppData\Local\Android\Sdk\ndk-bundle
sdk.dir=C:\Users\Elyes\AppData\Local\Android\Sdk
当然:
Imports System.IO
Imports System.IO.Compression
Imports System
Imports System.Windows.Forms
Imports System.Net
Imports System.Diagnostics
Public Class Form4
Dim tempdir As String = "C:\MediaZip"
Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Form1.Hide()
Me.BringToFront()
IO.Directory.Delete(tempdir, True)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
ProgressBar1.Show()
Timer1.Start()
TextBox2.Text = TextBox2.Text + "\" + TextBox3.Text
' Create ZIP from "source" directory (in program folder).
ZipFile.CreateFromDirectory("C:\MediaZip",
TextBox2.Text + ".zip",
CompressionLevel.Optimal,
False)
MessageBox.Show("The Process are complete", "MediaZip", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ProgressBar1.Hide()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim dialog As New FolderBrowserDialog()
dialog.RootFolder = Environment.SpecialFolder.Desktop
dialog.SelectedPath = "C:\"
dialog.Description = "Were To Store Your File ?"
If dialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox2.Text = dialog.SelectedPath
End If
TextBox2.Text = dialog.SelectedPath
Dim logDirectoryProperties As System.IO.DirectoryInfo
My.Computer.FileSystem.CopyFile(
TextBox1.Text,
"C:\MediaZip\" + TextBox4.Text)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim OpenFileDialog1 As New OpenFileDialog
OpenFileDialog1.InitialDirectory = "C:\"
OpenFileDialog1.FileName = "File To Zip..."
OpenFileDialog1.Multiselect = True
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim sName As String = OpenFileDialog1.SafeFileName
TextBox1.Text = OpenFileDialog1.FileName
TextBox4.Text = System.IO.Path.GetFileName(OpenFileDialog1.FileName)
IO.Directory.Delete(tempdir, True)
End If
End Sub
End Class
它仍然不起作用。
答案 0 :(得分:0)
我在windows pc上使用以下命令
task buildNative(type: Exec) {
workingDir 'jni'// directory app/jni
commandLine("${android.ndkDirectory}\\ndk-build.cmd", '-j', Runtime.runtime.availableProcessors())
}