bookdash / bookdash-android-app

An Android app that lets you download free children's books in different languages from non-profit publisher Book Dash
699 stars 260 forks source link

Build Failed: Execution failed for task ':app:processMockDebugGoogleServices'. #1

Closed farisalabed closed 8 years ago

farisalabed commented 8 years ago

Hello,

I am experiencing an issue while trying to to open this project in Android studio, I tried everything, below is the gradle issue, can you please help me :

Error: File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.

Gradle Console:

Executing tasks: [:app:generateMockDebugSources, :app:generateMockDebugAndroidTestSources, :app:compileMockDebugSources, :app:compileMockDebugAndroidTestSources, :fabbutton:generateDebugSources, :fabbutton:generateDebugAndroidTestSources, :fabbutton:compileDebugSources, :fabbutton:compileDebugAndroidTestSources] Parallel execution with configuration on demand is an incubating feature. google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used. please apply google-services plugin at the bottom of the build file. :app:preBuild UP-TO-DATE :fabbutton:preBuild :app:preMockDebugBuild UP-TO-DATE :fabbutton:preBuild UP-TO-DATE :app:checkMockDebugManifest :fabbutton:preReleaseBuild UP-TO-DATE :app:preProdDebugBuild UP-TO-DATE :fabbutton:compileReleaseNdk UP-TO-DATE :app:preProdReleaseBuild UP-TO-DATE :fabbutton:compileLint :app:generateMockDebugAssets UP-TO-DATE :fabbutton:copyReleaseLint UP-TO-DATE :app:generateMockDebugResValues :fabbutton:checkReleaseManifest :fabbutton:preDebugAndroidTestBuild UP-TO-DATE :fabbutton:preDebugBuild UP-TO-DATE :fabbutton:preDebugUnitTestBuild UP-TO-DATE :fabbutton:preReleaseUnitTestBuild UP-TO-DATE :app:generateMockDebugResValues UP-TO-DATE :fabbutton:prepareComAndroidSupportAppcompatV72220Library :app:processMockDebugGoogleServices FAILED :fabbutton:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE FAILURE: Build failed with an exception. - What went wrong: Execution failed for task ':app:processMockDebugGoogleServices'. > File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it. - Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 4.288 secs
riggaroo commented 8 years ago

Hi, Did you try follow the setup instructions? Step 7 indicates that you need to generate that google-services.json file.

Go generate a google-services.json file by following the instructions here: https://developers.google.com/mobile/add?platform=android You will need to select App Invites API and Google Analytics and enter your SHA-1 of your debug keystore. It will generate a file and you can place that in the module root folder.

farisalabed commented 8 years ago

I think it is my fault then, cuz i didnt know about the google-services.json file generation :) :+1: App is successfully built now :)

Could you help me understand Step 3? I imported data, but i would like to create my own drawings for kids using Wacom pad :)

If you want to download the actual books, you need to individually download each book and import the files into the parse manually. See the information here: https://www.parse.com/questions/exporting-file-objects-and-importing-to-another-application

riggaroo commented 8 years ago

Good to hear.

The individual books are created as .zip files, this contains the images in it that the book will use. So when you click the download button in the app, the zip file is downloaded and then unzipped. There is a file in the zip called bookdetails.json - this contains information about how the book should be rendered. It also contains a folder in it called images/ this contains all the images needed in the book. If you want to create a new book, add the different pages into the bookdetails.json file, and place the images in the images folder.

Then you will upload that .zip folder to parse - in the "BookDetail" table, the column "book_download_file".

Attached is a sample book zip file.

tfss-65a6ed5c-2bdd-4bcd-a71f-abbfa7f29bcb-searchingforspirit-en.zip