cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZhangYuan (JIRA)" <>
Subject [jira] [Created] (CB-9520) A strage proble while running 'cordova build android' in multiply project
Date Thu, 20 Aug 2015 06:14:45 GMT
ZhangYuan created CB-9520:

             Summary: A strage proble while running 'cordova build android' in multiply project
                 Key: CB-9520
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android, CordovaLib
    Affects Versions: 4.1.1
         Environment: windows 8.1 Pro 64bit, 
Android SDK Build-tools 23.0.0, 
Gradle 2.4, 
cordova 4.1.2
            Reporter: ZhangYuan

I am trying to do 'cordova build android' in a multiply project and got a strage problem which
I cannot find any answer in stackoverflow.
Would you please help me ?
My projects structure like :
    |-- build.gradle
    |-- setting.gradle
       |-- build.gradle
       |-- setting.gradle
       |-- build.gradle
       |-- setting.gradle
       |-- build.gradle
       |-- setting.gradle
          |-- build.gradle
          |-- setting.gradle

'cordova prepare android' and 'cordova plugins' run successfully, but 'cordova build android'
failed in very long and strange error:

    Running command: ******\platforms\android\cordova\build.bat
    Running: ******android\gradlew cdvBuildDebug -b ****platforms\android\build.gradle -Dorg.gradle.daemon=true
    Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration
failure takes
    java.lang.IllegalStateException: buildToolsVersion is not specified.
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.codehaus.groovy.reflection.CachedMethod.invoke(
        at groovy.lang.MetaMethod.doMethodInvoke(

    FAILURE: Build failed with an exception.

    * Where:
    Build file '*****platforms\android\LibProject1\build.gradle' line: 49

    * What went wrong:
    A problem occurred evaluating project ':LibProject1'.
    > Project with path ':LibProject3' could not be found in project ':LibProject1'.

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


    Total time: 2.142 secs

                    throw e;
   Error code 1 for command: cmd with args: /s /c "******\platforms\android\gradlew cdvBuildDebug
    ******\platforms\android\build.gradle -Dorg.gradle.daemon=true"
    Error: ******platforms\android\cordova\build.bat: Command failed with exit code 8
          at ChildProcess.whenDone (****AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
          at ChildProcess.emit (events.js:98:17)
          at maybeClose (child_process.js:766:16)
          at Process.ChildProcess._handle.onexit (child_process.js:833:5)
seems it said my LibProject1/build.gradle has some wrong but 'gradle build' successed and
I got apk run normally. 

finally I found that when 'cordova build android' ran, file LibProject1/build.gradle is being
changed auto. for example: 

     compile project(':LibProject2')

is changed to 

     debugCompile project(path: ":LibProject3", configuration: "debug")
     releaseCompile project(path: ":LibProject3", configuration: "release")
I am realy confuse with this problem. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message