Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25773] Android: App won't compile if the folder contains space and dash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-02-21T23:48:46.000+0000
Affected Version/sRelease 7.0.2
Fix Version/sRelease 7.1.0
ComponentsAndroid
LabelsProjectName, android, build, space
ReporterShuo Liang
AssigneeJoshua Quick
Created2018-02-13T03:46:57.000+0000
Updated2018-03-05T23:11:48.000+0000

Description

Problem

Using Titanium 7.0.2.GA, apps won't compile in android if there is a folder with space and folder (i.e. "hello - world") in the path of the project.

Produce

1. Using a simple app attached (basically, it is a default app named "a - b") 2. Run in android platform 3. You will get following error
[INFO] :   Generating /Users/sliang/Downloads/a - b/build/android/res/values/theme.xml
[INFO] :   Running AAPT: /Users/sliang/Library/android-sdk-macosx/build-tools/26.0.3/aapt "package" "-f" "-m" "-J" "/Users/sliang/Downloads/a - b/build/android/gen" "-M" "/Users/sliang/Downloads/a - b/build/android/AndroidManifest.xml" "-A" "/Users/sliang/Downloads/a - b/build/android/bin/assets" "-S" "/Users/sliang/Downloads/a - b/build/android/res" "-I" "/Users/sliang/Library/android-sdk-macosx/platforms/android-26/android.jar" "-F" "/Users/sliang/Downloads/a - b/build/android/bin/app.ap_" "--output-text-symbols" "/Users/sliang/Downloads/a - b/build/android/intermediates/bundles" "--no-version-vectors" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview:android.support.design:android.support.compat"
[INFO] :   Building Java source files: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/javac "-J-Xmx1024M" "-encoding" "utf8" "-bootclasspath" "/Users/sliang/Library/android-sdk-macosx/platforms/android-26/android.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/kroll-v8.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/java_websocket.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-analytics.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/aps-analytics.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-android.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/jaxen-1.1.1.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/ti-commons-codec-1.3.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/kroll-common.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/titanium.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-multidex.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-filesystem.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-app.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-ui.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/nineoldandroids-appc-2.4.0.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-media.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-appcompat.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-v4.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-v7-appcompat.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-animated-vector-drawable.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-annotations.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-core-ui.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-core-utils.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-fragment.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-media-compat.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-vector-drawable.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-transition.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-v7-recyclerview.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-cardview.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-v7-cardview.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-design.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-design.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-compat.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/android-support-compat.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-locale.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-network.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-xml.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-map.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-calendar.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-geolocation.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-database.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-platform.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-accelerometer.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-contacts.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-gesture.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/modules/titanium-utils.jar:/Users/sliang/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/android/lib/titanium-verify.jar:R.class:ABActivity.class:ABAppInfo.class:ABApplication.class" "-d" "/Users/sliang/Downloads/a - b/build/android/bin/classes" "-proc:none" "-target" "1.7" "-source" "1.7" "@/Users/sliang/Downloads/a - b/build/android/java-sources.txt"
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] :  Failed to run dexer:
[ERROR] :  
[ERROR] :  FAILURE: Build failed with an exception.
[ERROR] :  
[ERROR] :  * What went wrong:
[ERROR] :  Execution failed for task ':proguard'.
[ERROR] :  > java.io.FileNotFoundException: /Users/sliang/Downloads/a - b/build/android/b/build/android/bin/classes (No such file or directory)
[ERROR] :  
[ERROR] :  * Try:
[ERROR] :  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] :  
[ERROR] :  * Get more help at https://help.gradle.org
[ERROR] :  
[ERROR] :  BUILD FAILED in 1m 18s

Note

1.SDK 7.0.1 works well.

Attachments

FileDateSize
a_-_b.zip2018-02-13T03:32:28.000+0000712872

Comments

  1. Joshua Quick 2018-02-13

    Hmm... interesting. It's not just a space issue, because a project folder named "Path Test" builds fine with 7.0.2.GA. However, a folder name with a space followed by a dash (ie: " -") does cause a build failure. It appears that the gradle ProGuard step is attempting to parse a command line argument from it when it shouldn't. We'll look into it.
  2. Joshua Quick 2018-02-15

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9824 PR (7.1.x): https://github.com/appcelerator/titanium_mobile/pull/9827
  3. Abir Mukherjee 2018-02-21

    FR passed.
  4. Lokesh Choudhary 2018-03-05

    Verified the fix with SDK 7.1.0.v20180302141418 & 7.2.0.v20180302144729. Closing. Studio Ver: 5.0.0.201712081732 OS Ver: 10.13.2 Xcode Ver: Xcode 9.2 Appc NPM: 4.2.12 Appc CLI: 7.0.2 Daemon Ver: 1.0.1 Ti CLI Ver: 5.0.14 Alloy Ver: 1.11.0 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Nexus 6P --- Android 8.0.0

JSON Source