Skip to content
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

Unable to build and run in Archlinux #1

Closed
sgon00 opened this issue Dec 6, 2017 · 2 comments
Closed

Unable to build and run in Archlinux #1

sgon00 opened this issue Dec 6, 2017 · 2 comments

Comments

@sgon00
Copy link

sgon00 commented Dec 6, 2017

Hi, I am not sure what the problem is and if I do anything wrong. I am unable to build and run this project in the latest flutter release. Thank you very much for your help.

OS: Arch linux

I did flutter upgrade before running this project. so everything should be up-to-date.

$ flutter doctor
[✓] Flutter (on Linux, locale en_US.UTF-8, channel master)
    • Flutter at /home/user/opt/flutter
    • Framework revision 324ef1d1f6 (6 hours ago), 2017-12-05 19:17:58 -0800
    • Engine revision b57fca02b5
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d4cfecb1065d322d3670df7e9ec9a0cc2d4b90f0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at /home/user/Android/Sdk
    • Android NDK location not configured (this optional configuration is useful for native profiling support)
    • Platform android-25, build-tools 25.0.3
    • ANDROID_HOME = /home/user/Android/Sdk
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version openjdk version "1.8.0_152-release"

[✓] Android Studio (version 3.0)
    • Android Studio at /opt/android-studio
    • Java version openjdk version "1.8.0_152-release"

[✓] Connected devices
    • Redmi Note 3 • 7acabcd9 • android-arm • Android 7.1.1 (API 25)

The error:

$ flutter run --release
Initializing gradle...                                1.1s
Resolving dependencies...                            10.2s
Launching lib/main.dart on Redmi Note 3 in release mode...
Running 'gradlew assembleRelease'...                      
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Note: /home/user/.pub-cache/hosted/pub.dartlang.org/firebase_database-0.0.14/android/src/main/java/io/flutter/plugins/firebase/database/FirebaseDatabasePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/internal/zzaa;

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Gradle build failed: 1
@hekaiyou
Copy link
Owner

hekaiyou commented Dec 7, 2017

这个链接或许可以解决你的问题
https://zhidao.baidu.com/question/1387583606578002100.html?qq-pf-to=pcqq.group

@sgon00
Copy link
Author

sgon00 commented Dec 7, 2017

@hekaiyou 非常感谢您的回复。
我在 flutter/flutter#13079 中找到了解决问题的方法,在 pubspec.yaml 更改了下版本号解决了这个问题。具体更改如下:

-  firebase_database: ^0.0.14
-  firebase_storage: ^0.0.6
+  firebase_database: 0.0.12
+  firebase_storage: 0.0.5

再次感谢您。

@sgon00 sgon00 closed this as completed Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants