# Google analytics fail because of unknown png in Android Preview

**URL:** https://forums.fusetools.com/t/google-analytics-fail-because-of-unknown-png-in-android-preview/4843
**Category:** Bug Reports
**Created:** [August 7, 2017, 8:12am UTC](https://forums.fusetools.com/t/google-analytics-fail-because-of-unknown-png-in-android-preview/4843 "2017-08-07T08:12:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andus](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andus](https://forums.fusetools.com/u/Andus)
#### Post date: [August 7, 2017, 8:12am UTC](https://forums.fusetools.com/t/google-analytics-fail-because-of-unknown-png-in-android-preview/4843/1 "2017-08-07T08:12:43Z")

</div>

Hi, I have forked this [fuse-google-analytics](https://github.com/ErickTamayo/fuse-google-analytics) and I followed the fix on this [latest fix on analytics](https://www.fusetools.com/community/forums/howto_discussions/fuse-google-analytics), the code builds on simulator but it cannot build using Preview on Android, I am receiving the following error:

```auto
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:

```auto
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](https://github.com/anduscheung/fuse-google-analytics)

Fuse version: 1.1.0 (build 13808),  
Operating system version: Windows 10

---

<div class="post-metadata">

### Author: ![Andus](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andus](https://forums.fusetools.com/u/Andus)
#### Post date: [August 12, 2017, 9:47am UTC](https://forums.fusetools.com/t/google-analytics-fail-because-of-unknown-png-in-android-preview/4843/2 "2017-08-12T09:47:20Z")

</div>

Hi fuse, is there any update on this?

---

<div class="post-metadata">

### Author: ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)
#### Post date: [August 14, 2017, 7:11am UTC](https://forums.fusetools.com/t/google-analytics-fail-because-of-unknown-png-in-android-preview/4843/3 "2017-08-14T07:11:56Z")

</div>

It seems like you have hit an OS path length limit. Can you try to put the project some levels higher in directory tree or maybe rename the file and/or containing folders?

If it’s complaining about a PNG file, the PNG file is there.
