krisc / events

EventsListing Android app written in Clojure
Other
144 stars 16 forks source link

INSTALL_FAILED_DEXOPT on device/emulator #12

Open defHLT opened 9 years ago

defHLT commented 9 years ago

Hello, I can't get basic app installed. I've changed javac options to 1.7 version, SDK version and location, nothing else.

project.clj:

(defproject ClojureTest/ClojureTest "0.0.1-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 {*warn-on-reflection* true}

  :source-paths ["src/clojure" "src"]
  :java-source-paths ["src/java"]
  :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
  :plugins [[lein-droid "0.3.0-beta4"]]

  :dependencies [[org.clojure-android/clojure "1.7.0-alpha3" :use-resources true]
                 [neko/neko "3.1.0-preview2"]]
  :profiles {:default [:dev]

             :dev
             [;; :android-common :android-user
              {:dependencies [[org.clojure-android/tools.nrepl "0.2.6"]]
               :target-path "target/debug"
               :android {:aot :all-with-unused
                         ;;:rename-manifest-package "com.mlatu.clojure.test.debug"
                         :manifest-options {:app-name "ClojureTest - debug"}}}]
             :release
             [;; :android-common
              {:target-path "target/release"
               :android
               { ;; Specify the path to your private keystore
                ;; and the the alias of the key you want to
                ;; sign APKs with.
                ;; :keystore-path "/home/user/.android/private.keystore"
                ;; :key-alias "mykeyalias"

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

  :android {;; Specify the path to the Android SDK directory.
             :sdk-path "/home/ice/dev/android-sdk-linux"

            ;; Try increasing this value if dexer fails with
            ;; OutOfMemoryException. Set the value according to your
            ;; available RAM.
            :dex-opts ["-JXmx4096M"]

            ;; If previous option didn't work, uncomment this as well.
            ;; :force-dex-optimize true

            :target-version "19"
            :aot-exclude-ns ["clojure.parallel" "clojure.core.reducers"
                             "cljs-tooling.complete" "cljs-tooling.info"
                             "cljs-tooling.util.analysis" "cljs-tooling.util.misc"
                             "cider.nrepl" "cider-nrepl.plugin"]})

Error:

% lein droid apk && lein droid install
Crunching resources...
Packaging resources...
Creating APK...
Signing APK with /home/ice/.android/debug.keystore ...
Aligning APK...
Installing APK...
/home/ice/dev/android-sdk-linux/platform-tools/adb -s 006454279617678e install -r /home/ice/junk/android-clojure/ClojureTest/target/debug/ClojureTest-debug.apk
278 KB/s (260729 bytes in 0.912s)
        pkg: /data/local/tmp/ClojureTest-debug.apk
Failure [INSTALL_FAILED_DEXOPT]

Abort execution.

logcat:

D/AndroidRuntime( 9127): 
D/AndroidRuntime( 9127): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 9127): CheckJNI is OFF
D/AndroidRuntime( 9127): Calling main entry com.android.commands.pm.Pm
D/DefContainer( 2222): Copying /data/local/tmp/ClojureTest-debug.apk to base.apk
D/PackageManager(18883): Renaming /data/app/vmdl212869473.tmp to /data/app/com.mlatu.clojure.test-1
I/art     (18883): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/arm/data@app@com.mlatu.clojure.test-1@base.apk@classes.dex' for file location '/data
/app/com.mlatu.clojure.test-1/base.apk': Failed to open oat filename for reading: No such file or directory
I/art     (18883): DexFile_isDexOptNeeded failed to open oat file '/data/app/com.mlatu.clojure.test-1/arm/base.odex' for file location '/data/app/com.mlatu.clojure.test-1
/base.apk': Failed to open oat filename for reading: No such file or directory
I/PackageManager(18883): Running dexopt on: /data/app/com.mlatu.clojure.test-1/base.apk pkg=com.mlatu.clojure.test isa=arm vmSafeMode=false
I/dex2oat ( 9141): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.mlatu.clojure.test-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm/data@app@com
.mlatu.clojure.test-1@base.apk@classes.dex --instruction-set=arm --instruction-set-features=div --runtime-arg -Xms64m --runtime-arg -Xmx512m
E/dex2oat ( 9141): Failed to open dex from file descriptor for zip file '/data/app/com.mlatu.clojure.test-1/base.apk': Entry not found
I/dex2oat ( 9141): dex2oat took 250.602ms (threads: 4)
E/installd(  187): DexInv: --- END '/data/app/com.mlatu.clojure.test-1/base.apk' --- status=0x0100, process failed
W/PackageManager(18883): Package couldn't be installed in /data/app/com.mlatu.clojure.test-1
W/PackageManager(18883): com.android.server.pm.PackageManagerException: scanPackageLI
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:5822)
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5160)
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:9987)
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:10495)
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService.access$2300(PackageManagerService.java:231)
W/PackageManager(18883):        at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:8441)
W/PackageManager(18883):        at android.os.Handler.handleCallback(Handler.java:739)
W/PackageManager(18883):        at android.os.Handler.dispatchMessage(Handler.java:95)
W/PackageManager(18883):        at android.os.Looper.loop(Looper.java:135)
W/PackageManager(18883):        at android.os.HandlerThread.run(HandlerThread.java:61)
W/PackageManager(18883):        at com.android.server.ServiceThread.run(ServiceThread.java:46)
defHLT commented 9 years ago

Is it the right place to put this report in? I saw link here somewhere in the clojure-android howto article.

rajendrajalal commented 8 years ago

did you get the solution for this issue because i am getting same error.