Install Native Android SDK into Flutter Project

0

Heyo. I am having an issue with installing the Dynamsoft Document Scanning SDK into my flutter project. The goal is to wrap the SDK in a flutter package. I already asked Dynamsoft directly for assistance but the were unable to help.

I tried installing it manually with no luck. I think I'm just too much of a noob.

When I used the module import method in Android Studio, the manafest throws some errors that are fixed by clicking on the suggested fixes, but the another issue arises when I try to build the flutter app. The Error:

Initializing gradle... 1,3s Resolving dependencies... 19,8s

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processReleaseResources'.

    Android resource linking failed Output: error: resource style/Theme.AppCompat.Light.NoActionBar (aka com.example.dynamsoftwrapper:style/Theme.AppCompat.Light.NoActionBar) not found. C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:195: error: style attribute 'attr/colorPrimary (aka com.example.dynamsoftwrapper:attr/colorPrimary)' not found. C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:196: error: style attribute 'attr/colorPrimaryDark (aka com.example.dynamsoftwrapper:attr/colorPrimaryDark)' not found. C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:197: error: style attribute 'attr/colorAccent (aka com.example.dynamsoftwrapper:attr/colorAccent)' not found. error: failed linking references.

    Command: C:\Users\ARiley.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\cc4b7ad95579847e07c9aee6703b84af\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\ C:\Users\ARiley\AppData\Local\Android\sdk\platforms\android-28\android.jar\ --manifest\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml\ -o\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\processed_res\release\processReleaseResources\out\resources-release.ap_\ -R\ @C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\incremental\processReleaseResources\resources-list-for-resources-release.ap_.txt\ --auto-add-overlay\ --java\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\generated\not_namespaced_r_class_sources\release\processReleaseResources\r\ --custom-package\ com.example.dynamsoftwrapper\ -0\ apk\ --output-text-symbols\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\symbols\release\R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 Output: error: resource style/Theme.AppCompat.Light.NoActionBar (aka com.example.dynamsoftwrapper:style/Theme.AppCompat.Light.NoActionBar) not found. C:\Users\ARiley.gradle\caches\transforms-1\files-1.1\dynamsoftcamerasdk2.0.0.aar\0e364c7eab9a26e929eb0396ec03559b\res\values\values.xml:199:5-203:13: AAPT: error: style attribute 'attr/colorPrimary (aka com.example.dynamsoftwrapper:attr/colorPrimary)' not found.

    C:\Users\ARiley.gradle\caches\transforms-1\files-1.1\dynamsoftcamerasdk2.0.0.aar\0e364c7eab9a26e929eb0396ec03559b\res\values\values.xml:199:5-203:13: AAPT: error: style attribute 'attr/colorPrimaryDark (aka com.example.dynamsoftwrapper:attr/colorPrimaryDark)' not found.

    C:\Users\ARiley.gradle\caches\transforms-1\files-1.1\dynamsoftcamerasdk2.0.0.aar\0e364c7eab9a26e929eb0396ec03559b\res\values\values.xml:199:5-203:13: AAPT: error: style attribute 'attr/colorAccent (aka com.example.dynamsoftwrapper:attr/colorAccent)' not found.

    error: failed linking references. Command: C:\Users\ARiley.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\cc4b7ad95579847e07c9aee6703b84af\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\ C:\Users\ARiley\AppData\Local\Android\sdk\platforms\android-28\android.jar\ --manifest\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml\ -o\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\processed_res\release\processReleaseResources\out\resources-release.ap_\ -R\ @C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\incremental\processReleaseResources\resources-list-for-resources-release.ap_.txt\ --auto-add-overlay\ --java\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\generated\not_namespaced_r_class_sources\release\processReleaseResources\r\ --custom-package\ com.example.dynamsoftwrapper\ -0\ apk\ --output-text-symbols\ C:\Work\Flutter\DocumentCaptureSDK\dynamsoftwrapper\build\app\intermediates\symbols\release\R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

  • 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

BUILD FAILED in 30s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 30,8s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https: for more information on the problem and how to fix it.


Gradle task assembleRelease failed with exit code 1

MrStruggles

Posted 2019-04-16T13:41:31.627

Reputation: 1

No answers