Hi, I have forked this fuse-google-analytics and I followed the fix on this latest fix on analytics, the code builds on simulator but it cannot build using Preview on Android, I am receiving the following error:
Build completed in 14.58 seconds
[Viewport]: Analytics Module Initialized
Fuse 1.1.0 (build 13808)
Configuring (2.8 s)
Compiling syntax tree (2.0 s)
Generating code and data (27.8 s)
Building Android app
2/2: AnalyticsExample.apk
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\src\debug\google-services.json
C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\google-services.json
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
## 2/2: AnalyticsExample.apk
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library
:app:prepareComAndroidSupportAppcompatV72340Library
:app:prepareComAndroidSupportDesign2340Library
:app:prepareComAndroidSupportRecyclerviewV72340Library
:app:prepareComAndroidSupportSupportV42340Library
:app:prepareComAndroidSupportSupportVectorDrawable2340Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library
:app:prepareComGoogleFirebaseFirebaseAnalytics940Library
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library
:app:prepareComGoogleFirebaseFirebaseCommon940Library
:app:prepareComGoogleFirebaseFirebaseCore940Library
:app:prepareComGoogleFirebaseFirebaseIid940Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:processDebugGoogleServices FAILED
BUILD FAILED
Total time: 38.488 secs
(unknown): E0200: Android build failed
?: Error E0200: Android build failed
(41.1 s)
Build completed in 73.87 seconds
1 error
fuse: Failed to compile project
I made a copy of the google-services.json file and pasted it at the second path and build the project with Android Preview again and it gave me this:
Fuse 1.1.0 (build 13808)
Configuring (2.0 s)
Compiling syntax tree (1.7 s)
Generating code and data (4.9 s)
Building Android app
2/2: AnalyticsExample.apk
Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png into C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png into C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
## 2/2: AnalyticsExample.apk
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2340Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid940Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources
Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png into C:\Users\Andus\Documents\GitHub\fuse-google-analytics\AnalyticsExample\build\Android\Preview\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
:app:mergeDebugResources FAILED
BUILD FAILED
Total time: 12.79 secs
(unknown): E0200: Android build failed
?: Error E0200: Android build failed
(14.2 s)
Build completed in 22.94 seconds
1 error
fuse: Failed to compile project
The error indicated that there is something wrong with a png file but in fact there is no such png file used in the sample build. There project is here: Sample Build
Fuse version: 1.1.0 (build 13808),
Operating system version: Windows 10