【问题标题】:Cordova won't compile android: classpath dependancy gradle 2.2.0 Alpha1Cordova 不会编译 android:classpath 依赖 gradle 2.2.0 Alpha1
【发布时间】:2016-09-16 21:23:45
【问题描述】:

恐怕这不是一个格式正确的问题,因为我什至不知道从哪里开始。将我的 Android 平台更新到 5.1.1。尝试运行 cordova build android 但出现错误:

如果我查看https://repo1.maven.org/maven2/com/android/tools/build/gradle,我确实看到了,没有 2.2.0 目录。但我是依赖项和 Android 平台的新手,“未指定”并没有给我线索从哪里开始寻找问题,更不用说如何解决它了。

我的 Gradle 包装器:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip

我尝试将 2.2.1 更改为 2.2.0,但不行——那只狗没有咬人。我的 build.gradle 中有这个:

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0-alpha1'

    }

我的插件是:

cordova-plugin-device 1.1.1 "Device"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-googleplayservices 19.0.3 "Google Play Services for Android"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.1.2 "StatusBar"
nl.x-services.plugins.socialsharing 5.0.11 "SocialSharing"

【问题讨论】:

标签: android cordova maven


【解决方案1】:

使用尝试

buildscript {
    repositories {
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:2.2.0'
      //  classpath 'com.android.tools.build:gradle:X.X.X' // your verison

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2016-09-21
  • 1970-01-01
  • 2014-04-05
  • 1970-01-01
  • 2015-03-12
  • 1970-01-01
  • 1970-01-01
  • 2018-06-13
相关资源
最近更新 更多