简体   繁体   English

无法使nativescript-plugin-firebase演示应用程序正常工作

[英]can't get nativescript-plugin-firebase demo app to work

I'm trying to get the nativescript-plugin-firebase demo app of Eddy Verbruggen to work but i keep getting errors, please help 我正在尝试让Eddy Verbruggen的nativescript-plugin-firebase演示应用程序正常工作,但我一直遇到错误,请帮忙

this is a link to the demo: https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo#nativescript-plugin-firebase-demo-app 这是演示的链接: https : //github.com/EddyVerbruggen/nativescript-plugin-firebase-demo#nativescript-plugin-firebase-demo-app

i have the newest Google Play Services and Google Repository installed and done all the things that were told in the tutorial but still no succes 我安装了最新的Google Play服务和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 run android Executing before-prepare hook from D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\hooks\\before-prepare\\nativescript-dev-typescript.js Found peer TypeScript 1.8.10 Project successfully prepared (android) WARNING: The file: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\node_modules\\nativescript-plugin-firebase\\platforms\\android\\README.md is depricated, you can read more about what will be the expected plugin structure here: https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0 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- 版本1.7到2.0

:config phase: createDefaultIncludeFiles +found plugins: nativescript-plugin-firebase +found plugins: tns-core-modules-widgets :config阶段:createDefaultIncludeFiles +找到的插件:nativescript-plugin-firebase +找到的插件:tns-core-modules-widgets

:config phase: createPluginsConfigFile Creating product flavors include.gradle file in D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android/configurations folder... :config阶段:createPluginsConfigFile在D:\\ s_a_m \\ nativescript \\ firstProject \\ nativescript-plugin-firebase-demo \\ Firebase \\ platforms \\ android / configurations文件夹中创建产品风味include.gradle文件...

:config phase: pluginExtend +applying configuration from: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\configurations\\include.gradle +applying configuration from: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\configurations\\nativescript-plugin-firebase\\include.gradle +applying configuration from: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\configurations\\tns-core-modules-widgets\\include.gradle :config阶段:plugin扩展+从以下位置应用配置: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

:config phase: copyAarDependencies :config阶段:copyAarDependencies

:config phase: addAarDependencies +adding dependency: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\libs\\aar\\firebase-release.aar +adding dependency: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\libs\\aar\\widgets-release.aar Incremental java compilation is an incubating feature. :config阶段: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 UP-TO-DATE :preF0F1DebugBuild UP-TO-DATE :checkF0F1DebugManifest :preF0F1ReleaseBuild UP-TO-DATE :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 :prepareComAndroidSupportSupportV42421Library UP-TO-DATE :prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE :prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE :pre :preBuild UP-TO-DATE:preF0F1DebugBuild UP-TO-DATE:checkF0F1DebugManifest:preF0F1ReleaseBuild UP-TO-DATE:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE:prepareComAndroidSupportAppcompatV72421Libraryprepare UPpar-ComateDate日期:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE:prepareComAndroidSupportSupportV42421Library UP-TO-DATE:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE :prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE:prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE:prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE:pre pareComGoogleFirebaseFirebaseAnalyticsImpl940Library 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 UP-TO-DATE :prepareFirebasedemoRuntimeUnspecifiedLibrary UP-TO-DATE :prepareWidgetsReleaseLibrary UP-TO-DATE :prepareF0F1DebugDependencies :compileF0F1DebugAidl UP-TO-DATE :compileF0F1DebugRenderscript UP-TO-DATE pareComGoogleFirebaseFirebaseAnalyticsImpl940Library 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 UP-TO-DATE:prepareFirebasedemoRuntimeUnspecifiedLibrary UP-TO-DATE:prepareWidgetsReleaseLibrary UP -TO-DATE:prepareF0F1DebugDependencies:compileF0F1DebugAidl UP-TO-DATE:compileF0F1DebugRenderscript UP-TO-DATE :generateF0F1DebugBuildConfig UP-TO-DATE :cleanLocalAarFiles :ensureMetadataOutDir :collectAllJars :setProperties :asbg:generateInterfaceNamesList :asbg:runAstParser UP-TO-DATE :asbg:generateBindings UP-TO-DATE :mergeF0F1DebugShaders UP-TO-DATE :compileF0F1DebugShaders UP-TO-DATE :generateF0F1DebugAssets UP-TO-DATE :mergeF0F1DebugAssets UP-TO-DATE :generateF0F1DebugResValues UP-TO-DATE :processF0F1DebugGoogleServices Parsing json file: D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\google-services.json :generateF0F1DebugResources :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\\9.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\\Fireb :generateF0F1DebugBuildConfig UP-TO-DATE:cleanLocalAarFiles:ensureMetadataOutDir:collectAllJars:setProperties:asbg:generateInterfaceNamesList:asbg:runAstParser UP-TO-DATE:asbg:generateBindings UP-TO-DATE:mergeF0-UPTO-Shader DATE:generateF0F1DebugAssets UP-TO-DATE:mergeF0F1DebugAssets UP-TO-DATE:generateF0F1DebugResValues UP-TO-DATE:processF0F1DebugGoogleServices解析json文件:D:\\ s_a_m \\ nativescript \\ firstProject \\ base \\ nativescript-plug-in \\ google-services.json:generateF0F1DebugResources: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 \\ 9.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 \\ Fireb ase\\platforms\\android\\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 :mergeF0F1DebugResources FAILED ase \\ platforms \\ android \\ 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:mergeF0F1DebugResources FAILED

FAILURE: Build failed with an exception. 失败:构建失败,发生异常。

  • What went wrong: Execution failed for task ':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\\9.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\\9.4.0\\res\\drawable-xhdpi-v4\\common_google_signin_btn_text_dark_pressed.9.png D:\\ s_a_m \\ nativescript \\ firstProject \\ nativescript-plugin-firebase-demo \\ Firebase \\ platforms \\ android \\ 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:错误: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 \\ 9.4.0 \\ res \\ drawable-xhdpi-v4 \\ common_google_signin_btn_text_dark_pressed.9.png

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

BUILD FAILED 建立失败

Total time: 20.794 secs Command D:\\s_a_m\\nativescript\\firstProject\\nativescript-plugin-firebase-demo\\Firebase\\platforms\\android\\gradlew.bat failed with exit code 1 总时间:20.794秒命令D:\\ s_a_m \\ nativescript \\ firstProject \\ nativescript-plugin-firebase-demo \\ Firebase \\ platforms \\ android \\ gradlew.bat失败,退出代码为1

run android 运行Android

┌────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────┐ │ Usage │ Synopsis │ │ Run on all connected │ $ tns run android [--key-store-path --key-store-password --key │ │ devices and running │ -store-alias --key-store-alias-password ] [--release] [--justlaunch] │ │ emulators │ │ │ Run on a selected │ $ tns run android --device [--key-store-path --key-store │ │ connected device or │ -password --key-store-alias --key-store-alias-password ] [- │ │ running emulator │ -release] [--justlaunch] │ │ Start an emulator and │ $ tns run android --emulator [] [--key-store-path --key │ │ run the app inside it │ -store-password --key-store-alias --key-store-alias- ──────────────────┬┬────────────────── ────────────────────────────────────── ────────────────┐│用法│简介││在所有连接的节点上运行│$ tns运行android [--key-store-path --key-store-password --key│ │设备和运行│-store-alias --key-store-alias-password] [--release] [--justlaunch]││仿真器│││在选定的│$ tns上运行android --device [- key-store-path --key-store││连接的设备或│-password --key-store-alias --key-store-alias-password] [-││运行模拟器│-release] [--justlaunch] ││启动仿真器,然后│$ tns运行android --emulator [] [--key-store-path --key││在其中运行应用程序│-store-password -key-store-alias --key-商店别名 password │ │ │ ] [--release] [--justlaunch] │ └────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────┘ 密码│││] [--release] [--justlaunch]│└──────────────────┴ ────────────────────────────────────── ──────────────────┘

Runs your project on a connected Android device or in a native Android emulator, if configured. 在已连接的Android设备上或在本机Android仿真器(如果已配置)中运行项目。 This is shorthand for prepare, build and deploy. 这是准备,构建和部署的简写。 While your app is running, prints the output from the application in the console. 当您的应用程序运行时,在控制台中打印该应用程序的输出。

Options 选件

* --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.

Attributes 属性

* <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

Sending exception report (press Ctrl+C to stop)..... 正在发送异常报告(按Ctrl + C停止).....

Did you see the actual issue and did you try to solve it already? 您是否看到了实际问题,并且已经尝试解决了吗?

I mean, this file has a path of 247 characters where only 240 are allowed: 我的意思是,此文件的路径为247个字符,其中仅允许240个字符:

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\\9.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 \\ 9.4.0 \\ res \\ drawable-xhdpi-v4 \\ common_google_signin_btn_text_dark_pressed.9.png

So I guess move the project up a folder and clone the demo app in a folder with a short(er) name. 因此,我想将项目移到一个文件夹中,然后将演示应用程序克隆到一个短名称的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将nativescript-plugin-firebase与Nativescript应用程序集成以进行推送通知 - How to integrate nativescript-plugin-firebase with Nativescript app for push notification 使用nativescript-plugin-firebase使用Facebook-app登录失败,没有错误#ios - Login with Facebook-app using nativescript-plugin-firebase failed with no error #ios 如何获得 Nativescript-plugin-firebase admob SMART_BANNER 高度 - How to get Nativescript-plugin-firebase admob SMART_BANNER height 使用nativescript-plugin-firebase添加带有查询的事件监听器 - Using the nativescript-plugin-firebase add an Event Listener with a Query ../node_modules/nativescript-plugin-firebase/firebase.js 中的 Nativescript 错误 - Nativescript ERROR in ../node_modules/nativescript-plugin-firebase/firebase.js Nativescript-Vue:Firebase/Firestore 混淆 w/nativescript-plugin-firebase - Nativescript-Vue: Firebase/Firestore Confusion w/nativescript-plugin-firebase 无法使Firebase Google App脚本快速入门教程正常工作 - Can't Get Firebase Google App Script Quickstart Tutorial to Work Firebase Android中的orderByChild; 无法正常工作 - Firebase orderByChild in android; can't get it to work 无法让 CORS 与 firebase function 一起使用 - Can't get CORS to work with firebase function NativeScript firebase插件 - NativeScript firebase plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM