Open lucas-daniel-sm opened 4 years ago
The share library "zlib.cpython-36m.so" and "zlib.cpython-36m.so" in folder "example/android/app/src/main/assets" is for armeabi. They should be replaced with x86 version.
Thanks for the guidance! That's the reason probably...
But any link to the various versions of the files?
Edit: found these files useful: https://github.com/srplab/starcore_for_android/blob/master/starcore_for_android.3.6.0.zip https://github.com/srplab/starcore_for_android
I copied the assets from the example available on srplab.info (http://www.srplab.info/datas/flutter_and_python_sample.zip) to my project, when I run the "flutter run" it works normally, however when running "flutter build apk "I have the following error:
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK
size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Removed unused resources: Binary resource data reduced from 44KB to 35KB: Removed 20%
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':starflut:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex 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
BUILD FAILED in 1m 30s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 91,5s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve
the incompatibility.
Building plugin starflut...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 105,9s
Downloading https://services.gradle.org/distributions/gradle-4.4-all.zip
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping C:\Users\lucas\.gradle\wrapper\dists\gradle-4.4-all\9br9xq1tocpiv8o6njlyu5op1\gradle-4.4-all.zip to C:\Users\lucas\.gradle\wrapper\dists\gradle-4.4-all\9br9xq1tocpiv8o6njlyu5op1
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'starflut'.
> The SDK directory 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\starflut-0.6.0\android\home\lihm\Android\Sdk' does not exist.
* 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 1m 45s
The plugin starflut could not be built due to the issue above.
After this error, I tried to use the library downloaded from github, and got the following error:
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Removed unused resources: Binary resource data reduced from 44KB to 35KB: Removed 20%
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':starflut:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex 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
BUILD FAILED in 1m 10s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 71,6s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin starflut...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 1,3s
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'starflut'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* 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 1s
The plugin starflut could not be built due to the issue above.
I copied the "local.properties" file from the downloaded library from the flutter to the library I downloaded from github, and edited it as follows:
sdk.dir=C:/Users/lucas/AppData/Local/Android/Sdk
flutter.sdk=C:/src/flutter
flutter.versionName=0.0.1
I ran the "flutter build apk" again and I got the message below:
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':starflut:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\52aeda8e04d8b8e585687eef29e0a45f\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\lucas\.gradle\caches\transforms-2\files-2.1\52aeda8e04d8b8e585687eef29e0a45f\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex 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
BUILD FAILED in 2m 58s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 179,4s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin starflut...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 43,5s
√ Built build\app\outputs\repo.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 28,7s
√ Built build\app\outputs\apk\release\app-release.apk (48.8MB).
However when installing the app on my smartphone (arm64) I get the message "flutterpythonapp apresenta falhas continuamente"
i build the app on the arm64 based processor and every thing worked fine
The share library "zlib.cpython-36m.so" and "zlib.cpython-36m.so" in folder "example/android/app/src/main/assets" is for armeabi. They should be replaced with x86 version.
@srplab Where can I get x86 version??
Hi. Did u solve this? How?
I create an Androis app, like the instructions in the Documentation, but i have this error:
`I/skeletonproc_module,32041( 9227): create service group[0], community 32bit version[3.5.0.260] @www.srplab.com I/skeletonproc_module,32044( 9227): "SetRegisterCode" function can be used to change it to professional version dynamically I/skeletonproc_module,32089( 9227): lua engine[Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio] I/skeletonproc_module,1592( 9227): create service success[test] I/flutter ( 9227): docPath = /data/data/com.example.flutterpythonapp/files I/flutter ( 9227): resPath = /data/data/com.example.flutterpythonapp/files I/flutter ( 9227): -1 1 load library [/data/app/com.example.flutterpythonapp-QLw8yXk21OuBnow5PksstQ==/lib/x86/libstar_python36.so] success.... 6 I/skeletonproc_module,48689( 9227): load library [/data/app/com.example.flutterpythonapp-QLw8yXk21OuBnow5PksstQ==/lib/x86/libstar_python36.so] success.... D/starcore( 9227): Begin call _PyCodecRegistry_Init D/starcore( 9227): import encodings failed.... D/starcore( 9227): ZipImportError("can't decompress data; zlib not available",) D/starcore( 9227): /data/data/com.example.flutterpythonapp/files:/data/data/com.example.flutterpythonapp/files/python3.6.zip:/data/data/com.example.flutterpythonapp/files/libs:/data/data/com.googlecode.pythonforandroid/files:/sdcard/com.googlecode.pythonforandroid/extras/python:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6:/data/data/com.googlecode.pythonforandroid/files/python/lib/python26.zip D/starcore( 9227): Py_Initialize: unable to load the file system codec F/libc ( 9227): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 9313 (Thread-3), pid 9227 (lutterpythonapp)
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:10/QSR1.190920.001/5891938:user/release-keys' Revision: '0' ABI: 'x86' Timestamp: 2020-04-02 13:25:16-0400 pid: 9227, tid: 9313, name: Thread-3 >>> com.example.flutterpythonapp <<< uid: 10135 signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- eax 00000000 ebx 0000240b ecx 00002461 edx 00000006 edi f680433e esi bf879e60 ebp f7c7ead0 esp bf879e08 eip f7c7ead9 backtrace:
00 pc 00000ad9 [vdso] (__kernel_vsyscall+9)
Lost connection to device.`
I think the problem is this: D/starcore( 9227): import encodings failed.... D/starcore( 9227): ZipImportError("can't decompress data; zlib not available",)
Thank you very much in advance!