2017-09-16 244 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

謝謝兄弟... –