Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11906] Android Packaging to SDK fails in Windows 7

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-12-10T20:16:34.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 Core
ComponentsAndroid
Labelscore, qe-and100112
ReporterPragya Rastogi
AssigneeMax Stepanov
Created2012-11-30T10:33:48.000+0000
Updated2012-12-11T00:39:46.000+0000

Description

Steps To Reproduce: 1. Complete install Studio 3.0 2. Create Android Module 3. Create Android Project 4. Package Android Module in Project/SDK/Directory. Actual: Packaging fails. Error Executing build.xml... C:\Users\pragya.rastogi\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121128151109\module\android\build.xml:370: The following error occurred while executing this line: C:\Users\pragya.rastogi\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121128151109\module\android\build.xml:325: exec returned: 2 Expected: packaging must occur properly.

Attachments

FileDateSize
AndPackaging.png2012-11-30T10:33:48.000+0000208500
build.xml2012-12-01T06:38:54.000+000018763
ConsoleLogsForndModpackging.txt2012-11-30T10:33:48.000+0000331
WindowsAndroidModPackaging.txt2012-11-30T10:33:48.000+00008284

Comments

  1. Ingo Muschenetz 2012-11-30

    When did this start to fail?
  2. Ingo Muschenetz 2012-11-30

    Okay, so this is in the NDK build:
       			<exec executable="${ndk.build}" dir="${tmpdir}" failonerror="true">
       				<arg value="TI_MOBILE_SDK=${mobilesdk.dir}"/>
       				<arg value="NDK_PROJECT_PATH=${tmpdir}"/>
       				<arg value="NDK_APPLICATION_MK=${tmpdir}/Application.mk"/>
       				<arg value="PYTHON=${python.exec}"/>
       				<arg value="V=${ndk.verbose}"/>
       			</exec>
       
    Running build.xml manually gives this error:
       ndk.build:
            [copy] Copying 14 files to C:\Users\INGOMU~1\AppData\Local\Temp\Ingo Muschenetz\testtimob11905module-generated
            [exec] Android NDK: Your Android application project path contains spaces: 'C:\Users\INGOMU~1\AppData\Local\Temp\/Ingo Muschenetz/testtimob11905module-generated'    
            [exec] Android NDK: The Android NDK build cannot work here. Please move your project to a different location.    
            [exec] C:\android-ndk-r8c-windows\android-ndk-r8c\build/core/build-local.mk:137: *** Android NDK: Aborting.    .  Stop.
       
  3. Ingo Muschenetz 2012-11-30

    Appears to be related to this commit: https://github.com/appcelerator/titanium_mobile/commit/8c1dd478b8ad03aebd3d262a46ec5619d3eb85c5
       <property name="tmpdir" value="${java.io.tmpdir}/${user.name}/${ant.project.name}-generated" />
       
    Removing user.name from the tmpdir allows me to build.
  4. Ingo Muschenetz 2012-11-30

    Simple fix is to use:
       
       			<propertyregex property="user.name.nospaces"
       			               input="${user.name}"
       			               regexp=" "
       			               replace="_"
       			               global="true" />
       			
       			<property name="tmpdir" value="${java.io.tmpdir}/${user.name.nospaces}/${ant.project.name}-generated" />
       
  5. Max Stepanov 2012-11-30

    PR https://github.com/appcelerator/titanium_mobile/pull/3505 3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3506
  6. Vishal Duggal 2012-11-30

    https://github.com/appcelerator/titanium_mobile/pull/3505 master https://github.com/appcelerator/titanium_mobile/pull/3506 3_0_X
  7. Eric Merriman 2012-11-30

    Still seeing this with build 3.0.0.v20121130150206. See http://pastie.org/5460612 for result of Stuio "run as ANT build" on the Build.xml.
  8. Max Stepanov 2012-12-01

    Edit: checking
  9. Ingo Muschenetz 2012-12-01

    FWIW, I see weird behavior on Windows 8. It's as if the user.name property is empty _sometimes_. If I delete user.name.nospaces from the tmpdir construction, it works 100% reliably for me.
  10. Max Stepanov 2012-12-01

    Followup PR https://github.com/appcelerator/titanium_mobile/pull/3513 3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3514
  11. Pragya Rastogi 2012-12-01

    Attached build.xml
  12. Lokesh Choudhary 2012-12-10

    Reopening as the issue is still seen on the following environment: Titanium studio : 3.0.0.201212071410 SDK Version : 3.0.0.v20121130150206;3.0.0.v20121130200208;3.0.0.v20121207120202 CLI version : 3.0.20 OS : Win 7 64 bit Cant package android module on win 7
  13. Ingo Muschenetz 2012-12-10

    Lokesh, please provide the exact error you are seeing now.
  14. Lokesh Choudhary 2012-12-10

    @Ingo I am seeing this error. Executing build.xml... C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:371: The following error occurred while executing this line: C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:326: exec returned: 2
  15. Ingo Muschenetz 2012-12-10

    Right-click on the build.xml to run as an ANT build and see what that returns.
  16. Lokesh Choudhary 2012-12-10

    I ran it as Ant build & got the following result:
        Buildfile: C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build.xml
        python.set.exec:
        python.check:
             [echo] Testing for Python
             [exec] Python 2.7.3
        init:
        process.annotations:
        generate.rhino.bindings:
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleModulePrototype.java
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\ExampleProxyPrototype.java
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\androidmoduleGeneratedBindings.java
        generate.rhino.idswitch:
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\androidmoduleGeneratedBindings.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleBootstrap.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleModulePrototype.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\ExampleProxyPrototype.java
        generate.v8.bindings:
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.AndroidmoduleModule.h
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.AndroidmoduleModule.cpp
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.ExampleProxy.h
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.ExampleProxy.cpp
        generate.bindings:
        pre.compile:
        js.compile:
        ndk.build:
        
        BUILD FAILED
        C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:341: The following error occurred while executing this line:
        C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:292: Neither the ANDROID_NDK environment variable, or the android.ndk property is not set to an existing Android NDK installation (check your module's build.properties)
        
        Total time: 3 seconds
        
  17. Ingo Muschenetz 2012-12-10

    Okay, now set the android.ndk property in the build.properties file and try again.
  18. Lokesh Choudhary 2012-12-10

    Ok,setting the ndk property & running ant build gives:
        Buildfile: C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build.xml
        python.set.exec:
        python.check:
             [echo] Testing for Python
             [exec] Python 2.7.3
        init:
        process.annotations:
        generate.rhino.bindings:
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleModulePrototype.java
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\ExampleProxyPrototype.java
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\androidmoduleGeneratedBindings.java
        generate.rhino.idswitch:
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\androidmoduleGeneratedBindings.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleBootstrap.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\AndroidmoduleModulePrototype.java
             [echo] Generating IDs for C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\java\com\app\mod\ExampleProxyPrototype.java
        generate.v8.bindings:
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.AndroidmoduleModule.h
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.AndroidmoduleModule.cpp
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.ExampleProxy.h
             [java] Generating C:\Users\Lokesh\Documents\TitaniumStudioWorkspace\androidmodule\build\generated\jni\com.app.mod.ExampleProxy.cpp
        generate.bindings:
        pre.compile:
        js.compile:
        ndk.build:
             [copy] Copying 14 files to C:\Users\Lokesh\AppData\Local\Temp\Lokesh\androidmodule-generated
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/armeabi'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/armeabi'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi'
             [exec] jni/Android.mk:32: warning: overriding commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp'
             [exec] jni/Android.mk:32: warning: ignoring old commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp'
             [exec] jni/Android.mk:35: warning: overriding commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/BootstrapJS.cpp'
             [exec] jni/Android.mk:35: warning: ignoring old commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/BootstrapJS.cpp'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/armeabi-v7a'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/armeabi-v7a'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/armeabi-v7a'
             [exec] jni/Android.mk:32: warning: overriding commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp'
             [exec] jni/Android.mk:32: warning: ignoring old commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp'
             [exec] jni/Android.mk:35: warning: overriding commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/BootstrapJS.cpp'
             [exec] jni/Android.mk:35: warning: ignoring old commands for target C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/BootstrapJS.cpp'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:263: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86/objs/com.app.mod'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/x86'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:432: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/libs/x86'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: overriding commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86'
             [exec] C:/Users/Lokesh/Desktop/android-ndk-r8c/build/core/build-binary.mk:350: warning: ignoring old commands for target C:\Users\Lokesh\AppData\Local\Temp\/Lokesh/androidmodule-generated/obj/local/x86'
             [exec] "Compile++ thumb : com.app.mod <= com.app.mod.AndroidmoduleModule.cpp
             [exec] "Compile++ thumb : com.app.mod <= com.app.mod.ExampleProxy.cpp
             [exec] gperf -L C++ -E -t "C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.gperf" > "C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp"
             [exec] 'gperf' is not recognized as an internal or external command,
             [exec] operable program or batch file.
             [exec] make: *** [C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp] Error 1
             [exec] make: *** Deleting file `C:/Users/Lokesh/AppData/Local/Temp/Lokesh/androidmodule-generated/KrollGeneratedBindings.cpp'
        
        BUILD FAILED
        C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:371: The following error occurred while executing this line:
        C:\Users\Lokesh\AppData\Roaming\Titanium\mobilesdk\win32\3.0.0.v20121207120202\module\android\build.xml:326: exec returned: 2
        
        Total time: 5 seconds
        
        
  19. Ingo Muschenetz 2012-12-10

    @Lokesh...have you installed gperf?
  20. Lokesh Choudhary 2012-12-10

    No,I do not have gperf.
  21. Lokesh Choudhary 2012-12-10

    @Ingo, Installed gperf & android packaging was successful.
  22. Lokesh Choudhary 2012-12-10

    Verified the fix I am able to package android module on win 7 without any issues. Titanium studio : 3.0.0.201212071410 SDK Version : 3.0.0.v20121207120202 CLI version : 3.0.20 OS : Win 7 64 bit

JSON Source