-
-
Notifications
You must be signed in to change notification settings - Fork 915
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
Can't Compile Flame on Android Studio 3.3.1 #48
Comments
Hi, @Monotoba Not sure what might be causing, but what gradle version are you using? Older versions might give weird errors. Also, you say you can't build from Android Studio; if you try to compile by hand (using gradle), does it work? I'm not sure what is the problem but these questions will give some guidance to the solution. |
Android Studio is kept up to date. My gradle version is a 4.10.2 version. I get the same results trying to compile from the command line or in MS Code. Flutter plugin is 3.33. |
Has their been any progress on this issue. Or perhaps you have some insight or need additional info from me? I have a small project I need to complete by next Tuesday that I really wanted to use Flame on. However, this issue will force me to find an alternative. If there is anything I can provide that would help, please let me know. |
Hello @Monotoba, this issue you are reporting is really odd, this does not seems to be a problem with Flame, but rather with gradle, at least as far as I reserached. I have tried compiling one of our projects that uses Flame with Android Studio, and everything worked fine. Have you tried cleaning gradle cache? This sometimes fixes these weird kind of problems, and I have found this on stackoverflow, which seems to be very similar to what you are experiencing: https://stackoverflow.com/questions/49825507/content-is-not-allowed-in-prolog-during-gradle-build Try cleaning your gradle cache like explained on that link, and get back to us if the problem still persists. Thanks |
Hopefully this will help:
FAILURE: Build failed with an exception.
BUILD FAILED in 9s |
This stills points to the same problem:
For some reason Gradle is not been able to parse the pom from some dependencies, which is very odd, because I downloaded the pom, took a look, and there is nothing wrong with it. Have you tried the suggestions on the stackoverflow link I sent on the previous message? Try running |
I did as you suggested but still get the same error. I also completely removed Android Studio and flutter from my machine and re-installed. I used Ubuntu snap to re-install where my previous install was from a download from google. I removed the android studio settings files in my home directory before reinstalling and I still have the same error. It only occurs when flame is included in the project's yaml. If I comment it out, I can compile a standard flutter app. I love what you have created but after spending today trying to get it work I'm going to have to move on to another solution. Please continue to consider this issue. If a solution can be found, I will return to flame. |
I just found this: facebook/react-native#15756 I still need to grok it myself but it may have some helpful info as it looks like the same or similar issue. |
I found the issue! I can successfully compile the examples and include Flame in my own projects now. :-) The issue is that the asm-5.1.pom I am getting has a space before the opening "<!--" removing the space solved the issue. I found this by opening the file in a hex editor. After finding a similar issue on Android Studio's issue list. The issue there is closed and marked as resolved. You may want to file this one away in case someone else has the issue. Thank you for your time and attention to this issue! |
What, this is really strange 😆 Anyway, glad that you got it working! Will be closing this but feel free to open new issue if you got any more problems :) |
Can't compile Flame on Android Studio 3.3.1
Android Studio 3.3.1
Build #AI-182.5107.16.33.5264788, built on January 28, 2019
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-45-generic
This error only occurs when Flame is added to the pubspec.yaml file of any project on my system. I've tried changing Flame version to no avail. I've tried using a hard coded version such as Flame: 0.10.1 with no effect. Removal of Flame from the pubspec.yaml file resolves the issue. However, it mean I can't build any projects that use flame. Which I really want to use! I would be very grateful for any help resolving this issue. Error info follow;
Compilation Error:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
ProcessException: Process "/home/randy/AndroidStudioProjects/barn_stormer_2/android/gradlew" exited abnormally:
[Fatal Error] asm-util-5.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] asm-5.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] asm-commons-5.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] proguard-gradle-5.3.3.pom:1:44: Content is not allowed in prolog.
[Fatal Error] asm-analysis-5.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] asm-tree-5.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] guava-22.0.pom:1:44: Content is not allowed in prolog.
[Fatal Error] httpmime-4.1.pom:1:44: Content is not allowed in prolog.
[Fatal Error] httpclient-4.2.6.pom:1:44: Content is not allowed in prolog.
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
A problem occurred configuring project ':audioplayers'.
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.
BUILD FAILED in 1s
Command: /home//AndroidStudioProjects/barn_stormer_2/android/gradlew app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
The text was updated successfully, but these errors were encountered: