我在Android Studio中有建筑问题,我用Beeware制作了一个Android应用,当我尝试构建时,我会遇到错误。
我尝试从Android Studio构建它,并修复了所有版本问题,除此错误以外的所有其他问题
Could not find method leftShift() for arguments [build_m0k5smvps1e1hvx1einev6dw$_run_closure1@34e45104] on task ':buildPythonDebug' of type org.gradle.api.DefaultTask.
我搜索了答案,但没有发现有用的东西
这是build.gradle
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
task buildPythonDebug << {
exec {
commandLine "voc -v -p app -o build/intermediates/classes/debug app".split()
}
exec {
commandLine "voc -v -p app_packages -o build/intermediates/classes/debug app_packages".split()
}
}
task buildPythonRelease << {
exec {
commandLine "voc -v -p app -o build/intermediates/classes/release app".split()
}
exec {
commandLine "voc -v -p app_packages -o build/intermediates/classes/release app_packages".split()
}
}
task run << {
exec {
commandLine "adb shell am start -n com.example.HelloWorld/android.AppName".split()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
project.afterEvaluate {
packageDebug.dependsOn buildPythonDebug
packageRelease.dependsOn buildPythonRelease
run.dependsOn installDebug
}
dependencies {
implementation 'com.android.support:appcompat-v7:25.3.1'
implementation 'com.android.support:recyclerview-v7:25.3.1'
}
每个task
都会更改
来自:
task abc << {
.
.
}
to:
task abc {
doLast {
.
.
}
}