clojure-android / lein-droid

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

lein droid install fails #124

Closed benbrittain closed 9 years ago

benbrittain commented 9 years ago

I followed the tutorial up until the install process. After doing some debugging I came up with this.

ben@mars ~/clojuroid $ lein droid install
(Warning: profile :android-common not found.)
(Warning: profile :android-user not found.)
Installing APK...
/home/ben/workspace/android-sdk-linux/platform-tools/adb -s ZX1G22FM3Z install -r /home/ben/clojuroid/target/debug/clojuroid.apk
4417 KB/s (2298212 bytes in 0.508s)
    pkg: /data/local/tmp/clojuroid.apk
Failure [INSTALL_FAILED_DEXOPT]

I ran logcat and got this

I/PackageManager( 2417): Running dexopt on: /data/app/com.benbrittain.petrarch.debug-1/base.apk pkg=com.benbrittain.petrarch.debug isa=arm vmSafeMode=false
I/dex2oat ( 5299): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.benbrittain.petrarch.debug-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm/data@app@ com.benbrittain.petrarch.debug-1@base.apk@classes.dex --instruction-set=arm --instruction-set-features=div --runtime-arg -Xms64m --runtime-arg -Xmx512m 
I/dex2oat ( 5299): Verification error in java.lang.Object clojure.tools.nrepl.middleware.session$add_stdin$fn__1521$fn__1525.invoke()
I/dex2oat ( 5299): java.lang.Object clojure.tools.nrepl.middleware.session$add_stdin$fn__1521$fn__1525.invoke() failed to verify: monitor-exit stack underflowls.nrepl.         middleware.session$add_stdin$fn__1521$fn__1525.invoke(): [0xE3]
E/dex2oat ( 5299): Verification failed on class clojure.tools.nrepl.middleware.session$add_stdin$fn__1521$fn__1525 in /data/app/com.benbrittain.petrarch.debug-1/base.apk       because: Verifier rejected class clojure.tools.nrepl.middleware.session$add_stdin$fn__1521$fn__1525 due to bad method java.lang.Object clojure.tools.nrepl.middleware.          session$add_stdin$fn__1521$fn__1525.invoke()
W/dex2oat ( 5299): mismatched stack depths (depth=0, incoming depth=1)
D/HeadsetStateMachine( 3561): Disconnected process message: 10, size: 0
I/SurfaceFlinger(  257): FPS: 7

Any recommendations? I tried with an app I was working on and an totally unmodified clojuroid.

Clojure 1.7.0-alpha3 neko 3.1.1 most recent android-sdk

alexander-yakushev commented 9 years ago

Try with to org.clojure-android/clojure "1.7.0-alpha6". This is a Lollipop issue that is fixed in that version.

benbrittain commented 9 years ago

It works! Thanks so much.

alexander-yakushev commented 9 years ago

You are welcome! I really have to update the versions in the samples/templates so that people don't bump into that anymore.