tldr;
Current version of Android Studio is not building an empty project (Build -> Make Project) once the Datalogic:Datalogic SDK v1:27 has been attached to the project.
I am attempting to build a barcode scanning app on a Datalogic Memor1 that will access our company api and retrieve inventory information based on the barcode. I’ve built a similar app with a different scanner model from a different company (we are testing a couple of different devices). So at first I jumped in and built the app and went to test it on the device and the app wouldn’t build (with studio pointing to the device to test on). After trying to figure out where the issue lie, I went back to basics and decided to just start with an empty project, and add the sdk, and build that, and then start adding code until I could see what breaks the project.
Well based on that theory, I started a new ‘empty activity’, and built that (no issues). I then verified in the SDK settings that Datalogic SDK v1 was checked for both Android 8.0 and Android 8.1 (since the device in question is on 8.1). After that, I right clicked app > Module Settings and set the Compile Sdk Version to Datalogic:Datalogic SDK v1:27, and clicked Apply.
When I then attempt to build -> make project, I get the follwing in my build log:
Executing tasks: [:app:assembleDebug] in project C:\Sites\TESTBED\ANDROID\DLTesting
Observed package id 'platforms;android-30' in inconsistent location 'C:\Users\CKIRaly\AppData\Local\Android\Sdk\platforms\android-30-2' (Expected 'C:\Users\CKIRaly\AppData\Local\Android\Sdk\platforms\android-30')
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
> Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:dataBindingGenBaseClassesDebug UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:compressDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:checkDebugDuplicateClasses UP-TO-DATE
> Task :app:desugarDebugFileDependencies UP-TO-DATE
> Task :app:mergeExtDexDebug UP-TO-DATE
> Task :app:mergeLibDexDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:writeDebugAppMetadata UP-TO-DATE
> Task :app:writeDebugSigningConfigVersions UP-TO-DATE
> Task :app:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\CKIRaly\\.gradle\\caches\\transforms-3\\a7351053dfaaea609f7d51aceb2fac93\\transformed\\appcompat-1.0.2\\res\\values-v28\\values-v28.xml","position":{"startLine":4,"startColumn":4,"startOffset":217,"endLine":7,"endColumn":12,"endOffset":442}}],"original":"ERROR:C:\\Users\\CKIRaly\\.gradle\\caches\\transforms-3\\a7351053dfaaea609f7d51aceb2fac93\\transformed\\appcompat-1.0.2\\res\\values-v28\\values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\CKIRaly\\.gradle\\caches\\transforms-3\\a7351053dfaaea609f7d51aceb2fac93\\transformed\\appcompat-1.0.2\\res\\values-v28\\values-v28.xml","position":{"startLine":8,"startColumn":4,"startOffset":447,"endLine":11,"endColumn":12,"endOffset":684}}],"original":"ERROR:C:\\Users\\CKIRaly\\.gradle\\caches\\transforms-3\\a7351053dfaaea609f7d51aceb2fac93\\transformed\\appcompat-1.0.2\\res\\values-v28\\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant) not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.classicoptical.dltesting:attr/colorOnPrimary)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.classicoptical.dltesting:attr/colorSecondary)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.classicoptical.dltesting:attr/colorSecondaryVariant)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.classicoptical.dltesting:attr/colorOnSecondary)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant) not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.classicoptical.dltesting:attr/colorOnPrimary)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.classicoptical.dltesting:attr/colorSecondary)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.classicoptical.dltesting:attr/colorSecondaryVariant)' not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml","position":{"startLine":2,"startColumn":4,"startOffset":100,"endLine":14,"endColumn":12,"endOffset":818}}],"original":"ERROR:C:\\Sites\\TESTBED\\ANDROID\\DLTesting\\app\\src\\main\\res\\values-night\\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.classicoptical.dltesting:attr/colorOnSecondary)' not found.\n ","tool":"AAPT"}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Users\CKIRaly\.gradle\caches\transforms-3\a7351053dfaaea609f7d51aceb2fac93\transformed\appcompat-1.0.2\res\values-v28\values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
ERROR:C:\Users\CKIRaly\.gradle\caches\transforms-3\a7351053dfaaea609f7d51aceb2fac93\transformed\appcompat-1.0.2\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant) not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.classicoptical.dltesting:attr/colorOnPrimary)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.classicoptical.dltesting:attr/colorSecondary)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.classicoptical.dltesting:attr/colorSecondaryVariant)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.classicoptical.dltesting:attr/colorOnSecondary)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant) not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.classicoptical.dltesting:attr/colorPrimaryVariant)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.classicoptical.dltesting:attr/colorOnPrimary)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.classicoptical.dltesting:attr/colorSecondary)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.classicoptical.dltesting:attr/colorSecondaryVariant)' not found.
ERROR:C:\Sites\TESTBED\ANDROID\DLTesting\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.classicoptical.dltesting:attr/colorOnSecondary)' not found.
* Try:
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.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
25 actionable tasks: 2 executed, 23 up-to-date
On the same token, I am fairly new to kotlin / android development, so any advice someone has as to my issue, I would be greatly appreciative of!
Thanks in advance!