Comments (13)
https://github.com/Arneball/Android-Scala-Installer
https://github.com/Arneball/ScalaInstallerExample/
from gradle-android-scala-plugin.
I tried to add this with the following code in build.gradle:
android {
buildTypes {
debug {
minifyEnabled true
proguardFile file("proguard-rules.pro")
dependencies {
provided 'org.scala-lang:scala-library:2.11.4'
}
}
release {
minifyEnabled true
proguardFile file("proguard-rules.pro")
dependencies {
compile 'org.scala-lang:scala-library:2.11.4'
}
}
}
}
However, incremental debug build still takes about 1:30, same as when I used ony compile "scala..."
. Am I doing anything wrong?
from gradle-android-scala-plugin.
Don't minify in debug if possible.
from gradle-android-scala-plugin.
If I set minifyEnabled false
, a clean build gives the following error after running almost 5 minutes:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:302)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/felix/software/android-sdk/build-tools/21.1.1/dx --dex --output /home/felix/workspace/ensichat/app/build/intermediates/dex/debug --input-list=/home/felix/workspace/ensichat/app/build/intermediates/tmp/dex/debug/libraryList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:302)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
(in a small project with ~2000 lines of Scala and dependencies MessagePack and support v4)
from gradle-android-scala-plugin.
I think that build.gradle doesn't configure MultiDexApplication correctly. Since v1.1, the plugin requires MultiDexApplication. Please check https://github.com/saturday06/gradle-android-scala-plugin#5-setup-multidexapplication
from gradle-android-scala-plugin.
Okay I've added Multidex, but now incremental compile time has risen to over 2 minutes.
Here's my build.gradle, and I've also set <application android:name="android.support.multidex.MultiDexApplication">
in manifest.
Any idea what I'm doing wrong?
from gradle-android-scala-plugin.
I couldn't find something wrong in your build.gradle.
To find time consuming task, please upload gradlew --debug assembleDebug
's result.
from gradle-android-scala-plugin.
Mine looks like this
http://pastebin.com/sZwLHX1G
from gradle-android-scala-plugin.
Not sure why the time went down to 1:30 now, but obviously that's still too long.
from gradle-android-scala-plugin.
I've improved the example at https://github.com/Arneball/ScalaInstallerExample. I've included akka and made it work with proguard.
consecutive assembleDebug takes less than 20 seconds, given that libraries are predexed. Excellent gradle plugin. Big kudos.
I am still struggling with multidex builds. It seems there are some undocumented proguard runs that are configurable. I get a proguard crash however so i'll keep investigating.
from gradle-android-scala-plugin.
@Nutomic I checked your log. But the log was truncated and I couldn't find time wasting process.
pastebin might truncate your log. Please upload the log again. Or try @Arneball's preinstalled libs (recommended!).
from gradle-android-scala-plugin.
@Arneball I tried to apply your example to my project, but I couldn't quite figure out what I need to copy to my existing project. When I tried it, the clean build wasn't finished after ~5 minutes. I've pushed the code here.
@saturday06 Damn I didn't expect that. Here's the full log on Dropbox. I've also pushed the code here.
from gradle-android-scala-plugin.
Check pull request
2014-11-30 19:50 GMT+01:00 Felix Ableitner [email protected]:
@Arneball https://github.com/Arneball I tried to apply your example to
my project, but I couldn't quite figure out what I need to copy to my
existing project. When I tried it, the clean build wasn't finished after ~5
minutes. I've pushed the code here
https://github.com/Nutomic/ensichat/tree/scala-installer.@saturday06 https://github.com/saturday06 Damn I didn't expect that. Here's
the full log on Dropbox
https://dl.dropboxusercontent.com/u/22457329/gradle-android-scala-plugin-issue-26.log.
I've also pushed the code here
https://github.com/Nutomic/ensichat/tree/multidex.—
Reply to this email directly or view it on GitHub
#28 (comment)
.
from gradle-android-scala-plugin.
Related Issues (20)
- Error:Cause: scala/util/Properties$ : Unsupported major.minor version 52.0 HOT 5
- macro paradise HOT 1
- scalaCompileOptions not working HOT 1
- Can't debug scala code in intellij IDEA
- Support Build Tools 23.0.1 HOT 2
- Member functions of Activity not found on clean Build HOT 2
- Support for com.android.tools.build:gradle:1.4.0-beta6
- compileDebugJavaWithJavac download scala compiler 2.10.4
- Gradle test does not invoke tests in test or androidTest Directory
- Error:No such property: bootClasspath for class: com.android.builder.core.AndroidBuilder HOT 14
- Support Gradle Android Experimental
- No Scala SDK in module
- JavaFX (jfxmobile) with gradle-android-scala-plugin gives me "The 'java' plugin has been applied, but it is not compatible with the Android plugins." HOT 2
- How to generate Scaladoc?
- retrolambda support
- Sample projects does not work at all HOT 3
- No such property: bootClasspath for class HOT 1
- Please upload version 1.5 to jcenter and update README.md HOT 1
- It drains out of the memory when gradle executing task "transformClassesWithDex"
- :compileDebugScala: R class not available to scala compiler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-android-scala-plugin.