离子不生成android-build

时间:2017-09-16 04:46:56

标签: ionic-framework android-sdk-tools

[WARN]不执行项目类型的离子构建:ionic1。

  

离子cordova准备android   科尔多瓦准备安卓   运行命令:“C:\ Program Files \ nodejs \ node.exe”C:\ Users \ pini \ Desktop \ Drivercheckcall \ hooks \ after_prepare \ 010_add_platfo   rm_class.js C:\ Users \ pini \ Desktop \ Drivercheckcall

添加到body类:platform-android 运行命令:“C:\ Program Files \ nodejs \ node.exe”C:\ Users \ pini \ Desktop \ Drivercheckcall \ hooks \ after_prepare \ 020_remove_sas s_from_platforms.js C:\ Users \ pini \ Desktop \ Drivercheckcall

  

cordova build android --release   ×运行命令 - 失败!   [错误]运行cordova build android时出错 - 释放(退出代码1):

//get all the lines 
city.selectAll(".line").each(function(d){
  //each line get the total length
  var totalLength = this.getTotalLength();
  //perform transition for line using dasharray and offset
    d3.select(this)
  .attr("stroke-dasharray", totalLength + " " + totalLength)
  .attr("stroke-dashoffset", totalLength)
  .transition()
    .duration(2000)
  .attr("stroke-dashoffset", 0);

})

39)

    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

1 个答案:

答案 0 :(得分:1)

我之前已经看过这个问题,推送插件或地图插件或谷歌插件,它关于cordova插件及其依赖关系,在你的情况下,这行很有用。

  

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

所以一个修复就是:在platform / android open project.properties中,你会有这样的东西

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

尝试让google play服务在版本中匹配,在我的情况下指定版本之后我最终得到了这样的文件:

# 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:1.1.17@aar
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+