Author

Topic: problem building https://github.com/bitcoin-wallet/bitcoin-wallet (Read 902 times)

newbie
Activity: 12
Merit: 1
https://docs.gradle.org/3.3/userguide/gradle_wrapper.html

5.2. Adding the Wrapper to a project

The Wrapper is something you should check into version control. By distributing the Wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with. Of course, this is also great for continuous integration servers (i.e. servers that regularly build your project) as it requires no configuration on the server.
newbie
Activity: 12
Merit: 1
I'm trying to build the wallet on Android Studio 2.3.2 and getting into difficulty.

Try 1.  I tried to build it using "Check out project from version control: GitHub".  Ideally I'd like gradle wrapper to be the driving component here. 
When it downloads, the IDE asks: "Would you like to create a studio project?", to which I say yes.
I then chose "Import Model from external model", with the single option "gradle" selected.  I reckon this is more appropriate, since the github has gradle files.
On the next page, unfortunately the gradle wrapper option is greyed out ("not configured for the current project") and the only choice I have is a "local gradle distribution" option.
For gradle home I set: C:/Program Files/Android/Android Studio/gradle/gradle-3.2  and project format of .idea.

The gradle daemon starts and after a minute of activity, stops with:
"Gradle version 2.10 is required.  Current version is 3.2.  If you are using gradle wrapper ..."  - I'm unfortunately not on gradle wrapper for this project (though I'd like to be, for precisely this predicament.  The file it asks me to edit is one in the project's "gradle/wrapper" folder but I don't have that folder (since gradle wrapper was greyed out for me).
So dead end on try 1.
 
I reckon the AS 2.3.2 project launcher tool just doesn't know how properly to convert a github project straight into a 'gradle wrapper' controlled one.
Android studio 2.3.2 installed gradle/gradle-3.2 for me in that folder, and I'd rather like android studio and gradle wrapper to handle things like specific versions of the build tool - that after all is its purpose.

Try 2. Try 1 of course left the clone of the repository in my local file system, so next I tried to "Open an Existing Android Studio Project" on it.
Here I get asked "Gradle settings are not configured yet. Would you like to use gradle wrapper", to which I say OK.  I am hoping, in doing this, that gradle will get to know that 2.10 is required.
The daemon whirrs for a while then fails on:
Error:(1, 0) Gradle version 2.10 is required. Current version is 3.3.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project
Gradle settings

So now I have a gradle/wrapper folder and I edit the gradle-wrapper.properties in that project changing this line to
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip:

This works (project builds, testnet APK launches into emulator) but I get this nagging message:

Warning:Android Studio 2.3.2.0 requires Gradle 2.14.1 (or newer) but project is using version 2.10.
It is strongly recommended that you update Gradle to version 2.14.1 or newer.
Fix Gradle version (as part of the update, the Android plugin will be updated to version 2.3.2)
https://developer.android.com/studio/releases/index.html#Revisions">Open Documentation



What do you recommend I do from here?

Jump to: