clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

"Unterminated quoted string" error when following tutorial #152

Open interstar opened 8 years ago

interstar commented 8 years ago

Following the getting started / hello world tutorial (https://github.com/clojure-android/lein-droid/wiki/Tutorial), when I go to compile I get

$ lein droid doall  

(Warning: profile :android-common not found.)
(Warning: profile :android-user not found.)
Generating manifest...
Generating R.java files.
/PATH/TO/android-sdk-linux/build-tools/24.0.2/aapt: 1: /PATH/TO/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string

Abort execution.

Any ideas?

interstar commented 8 years ago

For the record I've rolled back to a couple of earlier releases of aapt and each of them throws a different error ... could they all be buggy or is there a file being generated by the leindroid build process that they don't like?

interstar commented 8 years ago

Folowing this https://forums.xamarin.com/discussion/28181/android-build-tools-21-0-1-aapt-exe-exited-with-code-1073741819-on-windows it does seem to work when I roll back to build-tools 23 (rather than any version of 24)

But maybe there's a filename being generated that this tool doesn't like?

interstar commented 8 years ago

Update :

so now I'm getting further through the build process but hitting a similar error with adb

...
Creating APK...
Signing APK with /home/phil/.android/debug.keystore ...
Aligning APK...
/home/phil/DevelopmentTools/android-sdk/android-sdk-linux/platform-tools/adb: 1: /home/phil/DevelopmentTools/android-sdk/android-sdk-linux/platform-tools/adb: Syntax error: Unterminated quoted string
interstar commented 8 years ago

Update :

even stranger. I CAN install the compiled apk from adb without problem

adb install target/debug/hellocjdroid.apk

works fine.

But

lein droid install

blows up.

alexander-yakushev commented 8 years ago

Hey Phil,

I haven't paid attention to Android SDK updates lately, so indeed compatibility of newer versions with lein-droid might be broken. I'll have to take a look myself. Thanks for reporting, what you've discovered so far will surely be helpful!

interstar commented 8 years ago

Thanks.

To recap, I've got this building with the 23 build tools but none of the 24 releases. All choke on something that's been given to them (but each version 24 / 24.01 and 24.02 give different error messages) I assume that they're just particuarly fussy about some input.

Even with the 23 tools, the adb is still blowing up when I try to lein droid install. But the same apk does install ok when I use adb install itself. So maybe something about how lein droid install generates / represents the path to it?

alexander-yakushev commented 8 years ago

lein droid install might fail somewhere before even reaching adb install.

interstar commented 8 years ago

But the error message seems to be coming from adb

PATH/TO/android-sdk-linux/platform-tools/adb: 1: /home/phil/DevelopmentTools/android-sdk/android-sdk-linux/platform-tools/adb: Syntax error: Unterminated quoted string
interstar commented 8 years ago

Can't be because I have a hyphen in the path to the sdk can it? Ie. "android-sdk-linux" ?

Actually, that's the default name that the sdk uses, so it shouldn't be a problem. But could anything in lein droid be getting confused by it?