<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>符号:可变的/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:位置:类HoneywellScannerNative错误:找不到符号properties.put(BarcodeReader.PROPERTY_UPC_E_ENABLED,真);^ BarcodeReader :变量BarcodeReader位置:类HoneywellScannerNative注释:HoneywellScannerNative使用或重写了一个不推荐的API。注意:有关详细信息,请使用-Xlint:deprecation重新编译。37个错误
失败:生成失败,出现异常。
问题所在:任务':honeywell_scanner:compileDebugJavaWithJavac'.的执行失败
编译失败;有关详细信息,请参阅编译器错误输出。
使用--stacktrace选项运行
以获取堆栈跟踪。使用--info或-调试选项运行以获得更多日志输出。用扫描来获得完整的洞察力。
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:调试器运行时Could‘。无法解决项目:霍尼韦尔。要求:项目:应用程序>项目:honeywell_scanner >没有匹配的项目配置:霍尼韦尔找到了。使用者被配置为找到组件的运行时(最好是为Android优化的),以及属性'com.android.build.api.attributes.BuildTypeAttr‘和值“debug”,属性'com.android.build.api.attributes.AgpVersionAttr’的值为“7.2.2”,属性“org.jetbrains.kotlin.platform.type”的值为“androidJvm”,但是:-所有可消费配置都没有属性。
发布于 2022-08-22 10:48:46
请按照以下步骤正确集成honeywell_scanner
https://pub.dev/packages/honeywell_scanner
honeywell_scanner添加
2.复制示例代码源中的honeywell文件夹,该文件夹位于:
.../.pub-cache/hosted/pub.dartlang.org/honeywell_scanner-x.x.x+x/example/android/honeywell
进入你的android项目模块,它将使用这个插件。这一步是必要的,也是至关重要的,因为霍尼韦尔数据收集系统库是一个包.aar,必须作为项目库引用。
。
https://stackoverflow.com/questions/73442994
复制相似问题