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

Getting error from gradle when run on android #23

Closed
lunwhl opened this issue Mar 27, 2019 · 5 comments
Closed

Getting error from gradle when run on android #23

lunwhl opened this issue Mar 27, 2019 · 5 comments

Comments

@lunwhl
Copy link

lunwhl commented Mar 27, 2019

First of all, thanks for sharing such nice flutter project with us.

I have a problem to run this project on android. Every was fine on iOS.
The error is shown as below.

  • Error running Gradle:
    ProcessException: Process "/Users/mac/shopping/natrium_wallet_flutter/android/gradlew" exited abnormally:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/mac/shopping/natrium_wallet_flutter/android/app/build.gradle' line: 65

  • What went wrong:
    A problem occurred evaluating project ':app'.

path may not be null or empty string. path='null'

  • 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 0s
Command: /Users/mac/shopping/natrium_wallet_flutter/android/gradlew app:properties

Please review your Gradle project setup in the android/ folder.

Besides that, I still found this 'Cannot resolve symbol GradleException' in Android studio like the picture below.
Screen Shot 2019-03-27 at 5 25 22 PM

Looking for help with this. thx

@bbedward
Copy link
Collaborator

Hi, there's two considerations on Android.

First you need to create a file called local.properties in the android/ folder. It should contain location to flutter SDK like so:

sdk.dir=/path/to/my/Android/sdk
flutter.sdk=/path/to/flutter_sdk/flutter
flutter.versionName=2.0.1
flutter.versionCode=27
flutter.buildMode=release%   

This might be automatically resolved for you in VS Code or Android Studio, but it may have not been able to auto-detect the android/flutter SDK.

Second is, that builds require the keystore information in android/key.properties.

I removed this dependency in a129144

Hopefully you can build it now

@lunwhl
Copy link
Author

lunwhl commented Mar 29, 2019

Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
Error launching application on Android SDK built for x86.

I have this error but it seems like I cannot test with android emulator since it is a x86 architecture emulator. It is a must to deploy this project on arm?

@bbedward
Copy link
Collaborator

Hi, the build.gradle only specifies arm and arm64 targets because of flutter/flutter#18494

I meant to add x86 before we release to the play store, but haven't done it yet.

I'll add x86 later today.

@bbedward
Copy link
Collaborator

Hi, I added x86 and x64 targets.

You can build for one of these with:

flutter build apk --debug --target-platform=android-x86

or

flutter build apk --debug --target-platform=android-x64

I'm not sure if it's possible to make production builds with an x86 or x64, but it should work well enough for the emulator.

@lunwhl
Copy link
Author

lunwhl commented Apr 1, 2019

Thanks you for your hard work ward. I will just close the issue. Everything is working fine now.

@lunwhl lunwhl closed this as completed Apr 1, 2019
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