<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.deneme_kaynak">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="${applicationName}"
android:label="deneme_kaynak"
android:icon="@mipmap/launcher_icon"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
符号: 变量BarcodeReader 位置: 类HoneywellScannerNative /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/honeywell_scanner-3.2.0+13/android/src/main/java/com/plugin/flutter/honeywell_scanner/HoneywellScannerNative.java: 108: 错误: 找不到符号 properties.put(BarcodeReader.PROPERTY_UPC_E_ENABLED, true); ^ 符号: 变量BarcodeReader 位置: 类HoneywellScannerNative 注意: /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/honeywell_scanner-3.2.0+13/android/src/main/java/com/plugin/flutter/honeywell_scanner/HoneywellScannerPlugin.java使用或覆盖了已过时的API。 注意: 重新编译时使用-Xlint:deprecation以获取详细信息。 37个错误
失败:构建失败。
- 出现了什么问题: 任务“:honeywell_scanner:compileDebugJavaWithJavac”执行失败。
编译失败;有关详细信息,请参见编译器错误输出。
- 尝试:
运行时加上 --stacktrace 选项可以获得堆栈跟踪信息。 运行时加上 --info 或 --debug 选项可以获得更多的日志输出。 运行时加上 --scan 选项可以获得完整的分析结果。
- 请访问 https://help.gradle.org 获取更多帮助。
app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.deneme_kaynak"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 29
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
build.gradle
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
编辑:
失败: 出现异常无法构建。
- 问题所在: 无法确定任务':app:mergeDebugAssets'的依赖关系。
无法解决配置':app:debugRuntimeClasspath'的所有任务依赖项。 无法解决项目:honeywell。 由以下要求: 项目:app > 项目:honeywell_scanner > 找不到匹配的项目honeywell配置。 消费者被配置为查找组件的运行时,最好是针对Android进行优化,并具有属性'com.android.build.api.attributes.BuildTypeAttr',其值为'debug',属性'com.android.build.api.attributes.AgpVersionAttr',其值为'7.2.2',属性'org.jetbrains.kotlin.platform.type',其值为'androidJvm',但: - 没有可消耗的配置具有属性。