无法让 nativescript-plugin-firebase 演示应用程序工作
can't get nativescript-plugin-firebase demo app to work
我正在尝试让 Eddy Verbruggen 的 nativescript-plugin-firebase 演示应用程序正常工作,但我总是遇到错误,请帮忙
这是 link 的演示:
https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo#nativescript-plugin-firebase-demo-app
我安装了最新的 Google Play Services 和 Google Repository 并完成了教程中的所有操作,但仍然没有成功
D:\s_a_m\nativescript\firstProject\weernietgoed>cd D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase
D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase>tns 运行 android
从 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\hooks\before-prepare\nativescript-dev-typescript.js 执行准备前挂钩
找到同行 TypeScript 1.8.10
项目准备成功 (android)
警告:文件:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\node_modules\nativescript-plugin-firebase\platforms\android\README.md 已删除,您可以阅读更多有关此处预期的插件结构:https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0
:配置阶段:createDefaultIncludeFiles
+发现插件:nativescript-plugin-firebase
+找到插件:tns-core-modules-widgets
:配置阶段:createPluginsConfigFile
在 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android/configurations 文件夹中创建产品口味 include.gradle 文件...
:配置阶段:pluginExtend
+从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\include.gradle
+从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\nativescript-plugin-firebase\include.gradle
+从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:配置阶段:copyAarDependencies
:配置阶段:addAarDependencies
+添加依赖项:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\libs\aar\firebase-release.aar
+添加依赖项:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\libs\aar\widgets-release.aar
增量 java 编译是一项孵化功能。
:preBuild 最新
:preF0F1DebugBuild 最新版本
:checkF0F1调试清单
:preF0F1ReleaseBuild 最新版本
:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
:prepareComAndroidSupportSupportV42421库最新
:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAuth940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAuthCommon940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAuthModule940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCommon940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCore940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCrash940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseDatabase940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseDatabaseConnection940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseIid940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseStorage940Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseStorageCommon940Library UP-TO-DATE
:prepareFirebaseReleaseLibrary 最新
:prepareFirebasedemo运行timeUnspecifiedLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary 最新
:prepareF0F1DebugDependencies
:compileF0F1DebugAidl 最新
:compileF0F1DebugRenderscript 最新
:generateF0F1DebugBuildConfig 最新
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:设置属性
:asbg:generateInterfaceNamesList
:asbg:运行AstParser 最新
:asbg:generateBindings 最新
:mergeF0F1DebugShaders 最新
:compileF0F1DebugShaders 最新
:generateF0F1DebugAssets 最新
:mergeF0F1DebugAssets 最新
:generateF0F1DebugResValues 最新
:processF0F1DebugGoogle服务
正在解析 json 文件:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\google-services.json
:generateF0F1DebugResources
:mergeF0F1调试资源
D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png:错误:Windows 上的文件路径太长,保持在 240 个字符以下:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
:mergeF0F1DebugResources 失败
失败:构建失败,出现异常。
出了什么问题:
任务“:mergeF0F1DebugResources”执行失败。
D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png: Error: File path too long on Windows, keep below 240 characters : D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
尝试:
运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。
构建失败
总时间:20.794 秒
命令 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\gradlew.bat 失败,退出代码为 1
运行 android
┌────────────────────────┬────────────────── ─────────────────────────────────────────────── ──────────────────────┐
│ 用途 │ 简介 │
│ 运行 在所有连接上 │ $ tns 运行 android [--key-store-path --key-store-password --key │
│ 设备和 运行ning │ -store-alias --key-store-alias-password ] [--release] [--justlaunch] │
│ 模拟器 │ │
│ 运行 在选定的 │ $ tns 运行 android --device [--key-store-path --key-store │
│ 连接的设备或 │ -password --key-store-alias --key-store-alias-password ] [- │
│ 运行ning 模拟器 │ -release] [--justlaunch] │
│ 启动模拟器 │ $ tns 运行 android --emulator [] [--key-store-path --key │
│ 运行 里面的应用程序 │ -store-password --key-store-alias --key-store-alias-password │
│ │ ] [--release] [--justlaunch] │
└────────────────────────┴──────────────────────── ─────────────────────────────────────────────── ──────────────────┘
运行在已连接的 Android 设备或本机 Android 模拟器(如果已配置)上运行您的项目。这是 shorthand 用于准备、构建和部署。当您的应用程序 运行ning 时,在控制台中打印应用程序的输出。
选项
* --watch - If set, when you save changes to the project, changes are automatically synchronized to the connected device.
* --device - Specifies a connected device on which to run the app.
* --emulator - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other valid combination of emulator options as listed by $ tns help emulate android.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options. * --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --justlaunch - If set, does not print the application output in the console.
属性
* <Device ID> is the index or name of the target device as listed by $ tns device android
* <Emulator Options> is any valid combination of options as listed by $ tns help emulate android
正在发送异常报告(按Ctrl+C停止)....
您是否看到实际问题并且已经尝试解决它?
我的意思是,这个文件有一个 247 个字符的路径,其中只允许 240 个字符:
错误:Windows 上的文件路径太长,请保持在 240 个字符以下:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed .9.png
所以我想将项目移到一个文件夹中,并将演示应用程序克隆到一个名称较短的文件夹中。
我正在尝试让 Eddy Verbruggen 的 nativescript-plugin-firebase 演示应用程序正常工作,但我总是遇到错误,请帮忙
这是 link 的演示: https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo#nativescript-plugin-firebase-demo-app
我安装了最新的 Google Play Services 和 Google Repository 并完成了教程中的所有操作,但仍然没有成功
D:\s_a_m\nativescript\firstProject\weernietgoed>cd D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase
D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase>tns 运行 android 从 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\hooks\before-prepare\nativescript-dev-typescript.js 执行准备前挂钩 找到同行 TypeScript 1.8.10 项目准备成功 (android) 警告:文件:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\node_modules\nativescript-plugin-firebase\platforms\android\README.md 已删除,您可以阅读更多有关此处预期的插件结构:https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0
:配置阶段:createDefaultIncludeFiles +发现插件:nativescript-plugin-firebase +找到插件:tns-core-modules-widgets
:配置阶段:createPluginsConfigFile 在 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android/configurations 文件夹中创建产品口味 include.gradle 文件...
:配置阶段:pluginExtend +从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\include.gradle +从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\nativescript-plugin-firebase\include.gradle +从以下位置应用配置:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:配置阶段:copyAarDependencies
:配置阶段:addAarDependencies +添加依赖项:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\libs\aar\firebase-release.aar +添加依赖项:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\libs\aar\widgets-release.aar 增量 java 编译是一项孵化功能。 :preBuild 最新 :preF0F1DebugBuild 最新版本 :checkF0F1调试清单 :preF0F1ReleaseBuild 最新版本 :prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE :prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE :prepareComAndroidSupportMultidex101Library UP-TO-DATE :prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE :prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE :prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE :prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE :prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE :prepareComAndroidSupportSupportV42421库最新 :prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAuth940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAuthCommon940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAuthModule940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseCommon940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseCore940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseCrash940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseDatabase940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseDatabaseConnection940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseIid940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseStorage940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseStorageCommon940Library UP-TO-DATE :prepareFirebaseReleaseLibrary 最新 :prepareFirebasedemo运行timeUnspecifiedLibrary UP-TO-DATE :prepareWidgetsReleaseLibrary 最新 :prepareF0F1DebugDependencies :compileF0F1DebugAidl 最新 :compileF0F1DebugRenderscript 最新 :generateF0F1DebugBuildConfig 最新 :cleanLocalAarFiles :ensureMetadataOutDir :collectAllJars :设置属性 :asbg:generateInterfaceNamesList :asbg:运行AstParser 最新 :asbg:generateBindings 最新 :mergeF0F1DebugShaders 最新 :compileF0F1DebugShaders 最新 :generateF0F1DebugAssets 最新 :mergeF0F1DebugAssets 最新 :generateF0F1DebugResValues 最新 :processF0F1DebugGoogle服务 正在解析 json 文件:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\google-services.json :generateF0F1DebugResources :mergeF0F1调试资源 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png:错误:Windows 上的文件路径太长,保持在 240 个字符以下:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png :mergeF0F1DebugResources 失败
失败:构建失败,出现异常。
出了什么问题: 任务“:mergeF0F1DebugResources”执行失败。
D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png: Error: File path too long on Windows, keep below 240 characters : D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png
尝试: 运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。
构建失败
总时间:20.794 秒 命令 D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\gradlew.bat 失败,退出代码为 1
运行 android
┌────────────────────────┬────────────────── ─────────────────────────────────────────────── ──────────────────────┐ │ 用途 │ 简介 │ │ 运行 在所有连接上 │ $ tns 运行 android [--key-store-path --key-store-password --key │ │ 设备和 运行ning │ -store-alias --key-store-alias-password ] [--release] [--justlaunch] │ │ 模拟器 │ │ │ 运行 在选定的 │ $ tns 运行 android --device [--key-store-path --key-store │ │ 连接的设备或 │ -password --key-store-alias --key-store-alias-password ] [- │ │ 运行ning 模拟器 │ -release] [--justlaunch] │ │ 启动模拟器 │ $ tns 运行 android --emulator [] [--key-store-path --key │ │ 运行 里面的应用程序 │ -store-password --key-store-alias --key-store-alias-password │ │ │ ] [--release] [--justlaunch] │ └────────────────────────┴──────────────────────── ─────────────────────────────────────────────── ──────────────────┘
运行在已连接的 Android 设备或本机 Android 模拟器(如果已配置)上运行您的项目。这是 shorthand 用于准备、构建和部署。当您的应用程序 运行ning 时,在控制台中打印应用程序的输出。
选项
* --watch - If set, when you save changes to the project, changes are automatically synchronized to the connected device.
* --device - Specifies a connected device on which to run the app.
* --emulator - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other valid combination of emulator options as listed by $ tns help emulate android.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options. * --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --justlaunch - If set, does not print the application output in the console.
属性
* <Device ID> is the index or name of the target device as listed by $ tns device android
* <Emulator Options> is any valid combination of options as listed by $ tns help emulate android
正在发送异常报告(按Ctrl+C停止)....
您是否看到实际问题并且已经尝试解决它?
我的意思是,这个文件有一个 247 个字符的路径,其中只允许 240 个字符:
错误:Windows 上的文件路径太长,请保持在 240 个字符以下:D:\s_a_m\nativescript\firstProject\nativescript-plugin-firebase-demo\Firebase\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base.4.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed .9.png
所以我想将项目移到一个文件夹中,并将演示应用程序克隆到一个名称较短的文件夹中。