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
Android install of scala 2.9.0 built binary fails (worked with scala 2.8.1) #4620
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4620?orig=1 |
Kevin Hester (kevinh) said: |
Nathan Moos (nathan.moos) said: |
@jrudolph said: |
@jrudolph said: |
@jrudolph said: The fix: scala/scala@7a99c03 I checked the resource consumption with my logging dalvikvm and the test app now seems to use only 4MB of LinearAlloc memory which is under the current limit of 5MB. In newer versions of Android (> 4) this limit has been increased to 8 MB so there should be some buffer space for the next time. |
@jrudolph said: |
Jan Berkel (jberkel) said: |
@jrudolph said: Independently, the related problem in the dalvikvm was now fixed as well. Once the change has trickled into devices (which will probably need several years) this issue should be dead several times by then :) |
Seth LaForge (sethml) said: |
@jrudolph said: |
Alexey Aksenov (ezhik) said: library.properties version.number=2.9.2 adb log: D/qemud ( 38): client_registration: registration succeeded for client 2 I am sure it is fixed now. BTW I successfully create Scala Android application (DigiSSHD) and publish it on Google Play. You may find a source code at GitHub. I suspect that is most complex application for Android at the moment (4Mb in summary) based on Scala 2.8.2. Unfortunately the new bug #SI-4626 prevent to build it and test with Scala 2.9 :( But library dex work properly at least. |
Matthew Willis (appamatto) said (edited on Jun 15, 2012 6:37:02 PM UTC): Are there specific language features that cause dexopt to act up? The link to the Android issue tracker mentions complicated inheritance hierarchies, which I would guess Scala generates for multiple inheritance. For now I will just start rewriting my code so that it doesn't use these features. I imagine that the Android trickle-down of this bug fix will take a couple of years. |
@soc said: |
@adriaanm said: |
I realize this is not necessarily a scala bug, but because with worked with scala 2.8.1 I thought I'd report it. I've created a pretty through writeup at the following github testcase:
https://github.com/humcycles/dexfailure
In short, if a scala 2.9.0 built jar contains the following code:
class ObservableTest extends ArrayBuffer[Int]
The eventually generated android adk is uninstallable on the android device.
The full description is as follows:
This gitrepo contains a small testcase that demonstrates a bug in the Android
dex installer and/or scala 2.9. I'm happy to update this report with more
details based on feedback from the community.
For now my workaround is to stay with scala-2.8.1.
If a generated apk contains the following scala code as a nested class
(or presumably a top level task) the "adb install
dexfailure-testcase_2.9.0-0.1.apk" will fail.
class ObservableTest extends ArrayBuffer[Int]
Install should not fail.
It is worth noting that the scala-2.8.1 based APK is substantially smaller than
the scala-2.9.0 version (200k vs 450k)
Steps to reproduce
Pull down this repo. I've included prebuilt working and failing APKs in
the target subdirectory if you don't want to build from source.
If you do want to build from source: cd into the repo and run
"sbt reinstall-emulator"
Note the error message about INSTALL_FAILED_DEXOPT
This failure seems to occur regardless of how much VMmax or RAM is given to the
device.
Details on failure:
Host reports:
[error] 1023 KB/s (434216 bytes in 0.414s)
[info] pkg: /data/local/tmp/dexfailure-testcase_2.9.0-0.1.apk
[info] Failure [INSTALL_FAILED_DEXOPT]
The text was updated successfully, but these errors were encountered: