bytepark / auto_orientation

A flutter plugin to programmatically change the orientation and rotate
MIT License
46 stars 47 forks source link

[Android] Problem after upgrading to Flutter 1.12 #10

Closed KnucklesEQ closed 4 years ago

KnucklesEQ commented 4 years ago

Hi,

After upgrading Flutter to version 1.12, I have a problem when I try to build the Android apk with this plugin.

I'm using _autoorientation 1.0.5 (but the problem also happens with previous versions)

So, if I execute this in the terminal:

flutter build apk -t lib/main.dart

The answer is:

FAILURE: Build failed with an exception.
_ What went wrong:
Execution failed for task ':autoorientation:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed
/Users/myusername/.gradle/caches/transforms-2/files-2.1/770ea370d069fd246bf26e2a436ee35e/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found. _ /Users/myusername/.gradle/caches/transforms-2/files-2.1/770ea370d069fd246bf26e2a436ee35e/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.

If I remove 'auto_orientation' from the pubspec.yaml file, the build works fine. I use other plugins, and this is the only one that has this type of problem. This error doesn't happen in previous versions of Flutter.

My flutter doctor:

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale es-ES) • Flutter version 1.12.13+hotfix.5 at /Users/pabloinsua/Programas/flutter • Framework revision 27321ebbad (hace 34 horas), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0 _ [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/pabloinsua/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 28.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0202-release-1483-b49-5587405) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.3, Build version 11C29 • CocoaPods version 1.8.3 _ [✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 42.1.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0202-release-1483-b49-5587405) [✓] IntelliJ IDEA Community Edition (version 2018.3.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 31.3.4 • Dart plugin version 183.5153.38 _ [✓] VS Code (version 1.40.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.2.0

romatroskin commented 4 years ago

Have the same issue here

biner88 commented 4 years ago

Have the same issue here

lichfy commented 4 years ago

android/build.gradle

android { compileSdkVersion 28 }

it's ok

sfaujour commented 4 years ago

Hey guy's, sorry for the late response.

I will have a look at the Code with Flutter 1.12 and try to fix this. Of course anyone already fixed this, i would also be happy if you would create a MR ;)

SynapseIX commented 4 years ago

I created a PR for this at https://github.com/bytepark/auto_orientation/pull/11.

fbatschi commented 4 years ago

The PR has been merged. Please give us feedback if the problem is fixed. We will push a new package as soon as possible.

SynapseIX commented 4 years ago

The PR has been merged. Please give us feedback if the problem is fixed. We will push a new package as soon as possible.

It did.

love-bk commented 4 years ago

The PR has been merged. Please give us feedback if the problem is fixed. We will push a new package as soon as possible.

When will 1.0.6 be released? I also encountered this problem

nambv commented 4 years ago

hi, any update for flutter 1.12 please? thank you very much

SynapseIX commented 4 years ago

The PR has been merged. Please give us feedback if the problem is fixed. We will push a new package as soon as possible.

When will 1.0.6 be released? I also encountered this problem

Just point the plugin to the repo's URL on your pubspec.yaml file to get v1.0.6. Once the package is published, you will be able to use the pub.dev version.

fbatschi commented 4 years ago

1.0.6 has been published