-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APK Build fail with errors "Superclass has no method named 'inheritFromElement'" #3
Comments
some packages must be updated for the null safety support |
Can you provide PR and merge the changes required to build the app using modern flutter version? I tried using older flutter version 1.22.1 instead which was released before the latest commit, and the build worked, here the modified Containerfile (with keystore generation) FROM frolvlad/alpine-glibc
RUN set -ex; \
apk update; \
apk add --no-cache \
gradle \
bash curl file git zip; \
adduser -D appuser;
USER appuser
COPY --chown=appuser:root . /app/paymint/
ENV ANDROID_SDK_ROOT="/app/sdk" \
ANDROID_HOME="/app/sdk"
RUN set -ex; \
ANDROID_SDK_LICENSES="${ANDROID_SDK_ROOT}/licenses"; \
mkdir -p "${ANDROID_SDK_LICENSES}"; \
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "${ANDROID_SDK_LICENSES}/android-sdk-license"; \
cd /app/sdk/; \
wget https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.22.1-stable.tar.xz; \
tar xf flutter_linux_1.22.1-stable.tar.xz; \
rm flutter_linux_1.22.1-stable.tar.xz; \
cd /app/paymint/android/; \
keytool -genkey -alias paymint_alias -keystore app/paymint.pfx -storetype PKCS12 -keyalg RSA -keysize 4096 -storepass paymint_alias -keypass paymint_alias -validity 10000 -dname CN=IL; \
printf "\nstoreFile=paymint.pfx\nstorePassword=paymint_alias\nkeyPassword=paymint_alias\nkeyAlias=paymint_alias\n" >> key.properties;
WORKDIR /app/paymint/
RUN /app/sdk/flutter/bin/flutter build apk podman build --rm -t paymint_build_apk .
podman run --rm --name paymint_built_apk -ti paymint_build_apk
podman cp paymint_built_apk:/app/paymint/build/app/outputs/flutter-apk/app-release.apk ~/paymint_rebuild.apk |
Is there any solution for this issue please? |
Building the app with flutter 1.22.1 works, building with newer flutter versions may fail, the solution for this might be to upgrading the packages in pubspec.yaml as explained in: #3 (comment)
|
Forgive me for asking, I'm a new developer. How do I get an older version of flutter, like 1.22.1? I have older apps and it seems the new version of flutter breaks them and they won't compile. |
Running
flutter build apk
result in errors:used the following Containerfile which was added after cloning this repo:
Run with
podman build --rm -t paymint_build_apk .
and the errors as shown above happen.The text was updated successfully, but these errors were encountered: