android - 构建 android 应用程序的问题,LeftShift 错误
问题描述
我在 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 << {
.
.
}
至:
task abc {
doLast {
.
.
}
}
推荐阅读
- ios - 如何在 Twilio 频道中获得会员?
- c# - FileStream 不保存数组文件
- oracle - 插入到 oracle DB 很慢 - JDBC
- vba - xlPastevalues 给了我一个对象定义的错误 VBA
- java - “受保护”修饰符没用吗?
- python - 如何使用循环用相关值填充 3D 矩阵?
- floating-point - 将浮点数转换为包含所有数字的字符串
- webpack - 如何在 DOM 准备好之前开始动态加载 JS?
- asp.net-mvc - AspNetZero - .NET Core 2.0 MVC 版本 - 添加新控制器时出错
- javascript - 如何将对象字符串拆分为单个字符串?VueJS 和计算属性