Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using cider for the tutorial #14

Open
nyrell opened this issue Jun 1, 2016 · 3 comments
Open

Problems using cider for the tutorial #14

nyrell opened this issue Jun 1, 2016 · 3 comments

Comments

@nyrell
Copy link

nyrell commented Jun 1, 2016

I have been trying for some days now to follow the android-clojure tutorial over at:
https://github.com/alexander-yakushev/events/blob/master/tutorial.md
"Android App Development with Clojure: An Interactive Tutorial"

Creating the event project works fine:
lein new droid events org.stuff.events :activity MainActivity :target-sdk 15 :app-name EventsListing

Building it and running it on my device works fine:
lein droid doall

When I start up emacs and try to connect with Cider I start to get problems though. When I do:
M-x cider-connect

I get the following error messages:
WARNING: CIDER requires nREPL 0.2.12 (or newer) to work properly
WARNING: CIDER's version (0.13.0-snapshot) does not match cider-nrepl's version (nil). Things will break!

I guess this is because I got a newer version of cider than what I have specified in my profiles.clj:
{:user {:plugins [ [lein-droid "0.4.3"] ] }
:android-common {:android {:sdk-path "/home/matny/prg/Android/Sdk"}}
:android-user {:dependencies [ [cider/cider-nrepl "0.9.1"] ]
:android {:aot-exclude-ns ["cider.nrepl.middleware.util.java.parser"
"cider.nrepl" "cider-nrepl.plugin"]}}}

I have followed the "More information" links:
http://cider.readthedocs.io/en/latest/troubleshooting/

and tried to fix this in various ways, but no success so far. Could anyone share a profile that works with the latest version of cider so that I can get this to work?

Also reading up on the cider page it seem to recommend that I connect to cider using cider-jack-in, instead and that I don't have to specify the cider-nrepl versions in the profiles.clj anymore if I do it that way. Would you recommend me to use this approach instead of cider-connect? (I have tried this too in various ways with no success...)

Regards,

Mattias Nyrell

@nyrell
Copy link
Author

nyrell commented Jun 9, 2016

I also tried to downgrade cider to use version 0.9.1, but when I do M-x cider-connect I get the following errors:

; CIDER 0.9.1 (Java 0, Clojure 1.7.0, nREPL 0.2.10)
WARNING: The following required nREPL ops are not supported:
classpath format-code format-edn refresh
Please, install (or update) cider-nrepl 0.9.1 and restart CIDER
user>

Any help would be appreciated! I guess the best way would be to get the newest version of cider working. Can anyone show your configuration?

@nyrell
Copy link
Author

nyrell commented Sep 1, 2016

Bump?

@sdave2
Copy link

sdave2 commented Sep 2, 2016

I am running into the same/similar error:

runnin the command
$ lein new droid anfocal com.lambdacat.anfocal :activity AnFocalActivity :target-sdk 23 :app-name AnFocal
$ lein droid doall

;;
Connecting to nrepl from emacs I get the following error:

WARNING: CIDER requires nREPL 0.2.12 (or newer) to work properly
More information.
WARNING: CIDER's version (0.13.0) does not match cider-nrepl's version (nil). Things will break!
More information.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.3.0-SNAPSHOT (package: 20160621.902) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.

I've included my project.clj file as is:

(defproject anfocal/anfocal "0.1.0-SNAPSHOT"
  :description "FIXME: Android project description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :global-vars {clojure.core/*warn-on-reflection* true}

  :source-paths ["src/clojure" "src"]
  :java-source-paths ["src/java"]
  :javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"]
  :plugins [[lein-droid "0.4.4"]]

  :dependencies [[org.clojure-android/clojure "1.7.0-r4"]
                 [neko/neko "4.0.0-alpha5"]]
  :profiles {:default [:dev]

             :dev
             [:android-common :android-user
              {:dependencies [[org.clojure/tools.nrepl "0.2.10"]]
               :target-path "target/debug"
               :android {:aot :all-with-unused
                         :manifest-options {:app-name "AnFocal (debug)"}
                         ;; Uncomment to be able install debug and release side-by-side.
                         ;; :rename-manifest-package "com.lambdacat.anfocal.debug"
                         }}]
             :release
             [:android-common
              {:target-path "target/release"
               :android
               {;; :keystore-path "/home/user/.android/private.keystore"
                ;; :key-alias "mykeyalias"
                ;; :sigalg "MD5withRSA"

                :use-debug-keystore true
                :ignore-log-priority [:debug :verbose]
                :aot :all
                :build-type :release}}]

             :lean
             [:release
              {:dependencies ^:replace [[org.skummet/clojure "1.7.0-r2"]
                                        [neko/neko "4.0.0-alpha5"]]
               :exclusions [[org.clojure/clojure]
                            [org.clojure-android/clojure]]
               :jvm-opts ["-Dclojure.compile.ignore-lean-classes=true"]
               :android {:lean-compile true
                         :proguard-execute true
                         :proguard-conf-path "build/proguard-minify.cfg"}}]}

  :android {;; Specify the path to the Android SDK directory.
            :sdk-path "/Users/home-user/Library/Android/sdk/"

            ;; Increase this value if dexer fails with OutOfMemoryException.
            :dex-opts ["-JXmx4096M" "--incremental"]

            :target-version "23"
            :aot-exclude-ns ["clojure.parallel" "clojure.core.reducers"
                             "cider.nrepl" "cider-nrepl.plugin"
                             "cider.nrepl.middleware.util.java.parser"
                             #"cljs-tooling\..+"]})

Any help would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants