2017-09-16 207 views
2

[警告]不执行项目类型的离子构建:ionic1。离子不生成android-build

离子科尔多瓦准备的Android 科尔多瓦准备的Android 运行命令: “C:\ Program Files文件\的NodeJS \ node.exe” C:\用户\皮尼\桌面\ Drivercheckcall \吊钩\ after_prepare \ 010_add_platfo rm_class。 JS C:\用户\皮尼\桌面\ Drivercheckcall

添加到体类:平台 - 安卓 运行命令: “C:\ Program Files文件\的NodeJS \ node.exe” C:\用户\皮尼\桌面\ Drivercheckcall \ hooks \ after_prepare \ 020_remove_sas s_from_platforms.js C:\ Users \ pini \ Desktop \ Drivercheckcall

cordova build android --release ×运行命令 - 失败! [错误]在运行科尔多瓦构建Android --release发生错误(退出代码1):

Running command: "C:\Program Files\nodejs\node.exe" 
    C:\Users\pini\Desktop\Drivercheckcall\hooks\after_prepare\010_add_platform_class.js 
    C:\Users\pini\Desktop\Drivercheckcall 
    add to body class: platform-android 
    Running command: "C:\Program Files\nodejs\node.exe" 
    C:\Users\pini\Desktop\Drivercheckcall\hooks\after_prepare\020_remove_sass_from_platforms.js 
    C:\Users\pini\Desktop\Drivercheckcall 
    ANDROID_HOME=C:\Users\pini\AppData\Local\Android\sdk 
    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144 
    Subproject Path: CordovaLib 
    Starting a Gradle Daemon (subsequent builds will be faster) 
    The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use 
    Task.doLast(Action) instead. 
      at build_yewq1sjt6kzw92w3qmfn4wt0.run(C:\Users\pini\Desktop\Drivercheckcall\platforms\android\build.gradle:1 

39)

FAILURE: Build failed with an exception. 

    * Where: 
    Script 
    'C:\Users\pini\Desktop\Drivercheckcall\platforms\android\phonegap-plugin-push\DriverCheckCall-push.gradle' line: 
    38 

    * What went wrong: 
    A problem occurred evaluating root project 'android'. 
    > Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] 
     > For input string: "+" 

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

    BUILD FAILED 

    Total time: 23.062 secs 
    Error: cmd: Command failed with exit code 1 Error output: 
    FAILURE: Build failed with an exception. 

    * Where: 
    Script 
    'C:\Users\pini\Desktop\Drivercheckcall\platforms\android\phonegap-plugin-push\DriverCheckCall-push.gradle' line: 
    38 

    * What went wrong: 
    A problem occurred evaluating root project 'android'. 
    > Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] 
     > For input string: "+" 

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

回答

1

我与推插件或地图见过这个问题插件或谷歌插件,这是关于科尔多瓦插件及其依赖项,在你的情况下,这条线是有帮助的。

无法应用插件[类 'com.google.gms.googleservices.GoogleServicesPlugin'] 对于输入字符串: “+” :

所以一个固定将是:里面的平台/机器人打开project.properties,你会有这样的事情

cordova.system.library.2=com.google.android.gms:play-services-maps:+ 
cordova.system.library.3=com.google.android.gms:play-services-location:+ 

尝试有谷歌的播放服务,以匹配版本,在我的情况,指定我结束了这样的文件版本后:

# This file is automatically generated by Android Tools. 
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! 
# 
# This file must be checked in Version Control Systems. 
# 
# To customize properties used by the Ant build system edit 
# "ant.properties", and override values to adapt the script to your 
# project structure. 
# 
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 
# Project target. 
target=android-25 
android.library.reference.1=CordovaLib 
cordova.system.library.1=com.android.support:support-v4:24.1.1+ 
cordova.system.library.2=com.google.android.gms:play-services-maps:11.0.1 
cordova.system.library.3=com.google.android.gms:play-services-location:11.0.1 
cordova.system.library.4=com.google.android.gms:play-services-location:11.0.1 
cordova.system.library.5=com.android.support:support-v13:25.1.0 
cordova.system.library.6=me.leolin:ShortcutBadger:[email protected] 
cordova.system.library.7=com.google.firebase:firebase-messaging:11.0.1 
cordova.gradle.include.1=phonegap-plugin-push/custodian-push.gradle 
cordova.system.library.8=com.squareup.okhttp3:okhttp:3+ 
+0

我仍然得到同样的错误 “内部平台/ Android开放project.properties” #cordova.system.library.2 = com.google.android.gms:发挥服务地点:+ cordova.system.library.2 = com.google.android.gms:play-services-maps:+ cordova.gradle.include.1 = cordova-plugin-mauron85-background-geolocation/DriverCheckCall-logtofile.gradle # cordova.system.library.3 = com.google.android.gms:play-services-location:+ cordova.system.library.3 = com.google.android.gms:play-services-location:+ 一世已经做了这个变化 –

+0

我看到很多'+',你应该像我在上面给我的回应中所示,用实际版本替换'+'试试我用于播放服务 – Alberick0

+0

谢谢兄弟... –