Flutter (Barcode_scan) build\barcode_scan\extracted-protos\main' 指定给 属性 '$4' 不存在
Flutter (Barcode_scan) build\barcode_scan\extracted-protos\main' specified for property '$4' does not exist
我正在使用 this 软件包扫描二维码。但是我升级到3.x版本,报错:
[ +2 ms] FAILURE: Build failed with an exception.
[ +2 ms] * What went wrong:
[ ] Some problems were found with the configuration of task ':barcode_scan:generateDebugProto'.
[ ] > Directory '<projectName>\build\barcode_scan\extracted-protos\main' specified for property '' does not exist.
[ +19 ms] * Try:
[ +17 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
我尝试将 main
文件夹添加到 extracted-protos
但是当我 运行 应用程序时,这个文件夹
丢了。
花了 2 天时间尝试修复它。最后我想出了如何:
转到 android
文件夹 > build.gradle
文件。添加行后:
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' //add this line
}
}
而且有效。
我正在使用 this 软件包扫描二维码。但是我升级到3.x版本,报错:
[ +2 ms] FAILURE: Build failed with an exception.
[ +2 ms] * What went wrong:
[ ] Some problems were found with the configuration of task ':barcode_scan:generateDebugProto'.
[ ] > Directory '<projectName>\build\barcode_scan\extracted-protos\main' specified for property '' does not exist.
[ +19 ms] * Try:
[ +17 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
我尝试将 main
文件夹添加到 extracted-protos
但是当我 运行 应用程序时,这个文件夹
丢了。
花了 2 天时间尝试修复它。最后我想出了如何:
转到 android
文件夹 > build.gradle
文件。添加行后:
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' //add this line
}
}
而且有效。