How to fix “build.gradle” problem in a Cordova project?

前端 未结 4 1601
孤街浪徒
孤街浪徒 2020-12-10 17:26
$ cordova build android --debug
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=E:\\andoidSDK (DEPRECATED)
S         


        
相关标签:
4条回答
  • 2020-12-10 17:58

    build.gradle file in replace :

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
    

    after run : ionic cordova build android --prod --release

    0 讨论(0)
  • 2020-12-10 18:07

    I changed

    classpath 'com.android.tools.build:gradle:3.3.0'

    to

    classpath 'com.android.tools.build:gradle:3.0.1'

    in /platforms/android/build.gradle file. My problem is solved.

    0 讨论(0)
  • 2020-12-10 18:10

    Change your system language to english
    This issue comes with Android Studio 3.3
    If you're using Single Language OS you can change version by following
    File > Project Structure > Project -> Android Plugin Version = 3.2

    0 讨论(0)
  • 2020-12-10 18:15

    In my case this was caused by a wrong value in your config.xml for android-versionCode

    This value should be numerical only.

    0 讨论(0)
提交回复
热议问题