android - 运行 ionic build android 时出现 mergeDebugResources 错误

标签 android google-analytics

我在运行ionic build android命令时遇到以下错误。我花了几个小时用谷歌搜索,但找不到任何解决方案。请大家帮忙。

FAILURE: Build failed with an exception.

What went wron Execution failed for task ':mergeDebugResources'. D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\and roid\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.6.1\res\drawable-t vdpi-v4\common_google_signin_btn_text_light_disabled.9.png: Error: File path too long on Windows, ke ep below 240 characters : D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-b ase\9.6.1\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':mergeDebugResources'. D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\and roid\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.6.1\res\drawable-t vdpi-v4\common_google_signin_btn_text_light_disabled.9.png: Error: File path too long on Windows, ke ep below 240 characters : D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-b ase\9.6.1\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png

Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output.

最佳答案

我的 friend 验证了错误堆栈,他发现了一个问题

让我们浏览一下上面错误中提到的行,

Error: File path too long on Windows, keep below 240 characters :

所以基本上 Windows 只允许路径有 240 个字符的限制。所以他更新了项目的路径,最终我们解决了问题。希望它能帮助别人!

关于android - 运行 ionic build android 时出现 mergeDebugResources 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40018511/

相关文章:

android - Flutter : Playback error E/ExoPlayerImplInternal( 8813): com. google.android.exoplayer2.ExoPlaybackException:源错误

android - 是否可以隐藏 RecyclerView 中最后一项的 ItemDecoration?

android - 使用 Robotium 关闭互联网连接

javascript - 如何将 Css/JQuery 文件应用到 Android WebView 中的外部页面

Android:使用按钮事件切换到另一个 Activity ?

indexing - 谷歌分析 : Can I use custom dimension name instead of index when sending data?

javascript - 从 chrome 扩展中的谷歌分析 api 获取数据?

php - Google Analytics api - 通过 URL 获取页面浏览量

javascript - 将 Google Analytics 发送到两个帐户

google-analytics - 进入子域时,UTM源被引荐覆盖