I'm trying to import this driver to my simple app (at the moment just only the default text view) in android 3.5 version. The driver library was installed and wanted to run the emulator and I encountered several Gradle issues and was able to fix them and finally ended up here. When I entered,
classpath 'com.android.support:multidex:1.0.3'
in the Gradle.
though the build successful, when I run the app I received the build error as mentioned below.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete
com.android.tools.r8.utils.AbortException: Error: null, Cannot fit requested classes in a single dex file (# methods: 114237 > 65536)
Further, I'm not sure where to put (as in this)
multiDexEnabled true
and (as in this) ,
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/INDEX.LIST'
}
since my build.gradle is as below,
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url "http://dl.bintray.com/shimmerengineering/Shimmer"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
apply plugin: 'eclipse'
classpath 'com.android.support:multidex:1.0.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "http://dl.bintray.com/shimmerengineering/Shimmer"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Any suggestion on how to fix this?
~ Thank you ~
Fixed as below :
Created a new test application and found the build.gradle file and included
allprojects { repositories { jcenter() maven { url "dl.bintray.com/shimmerengineering/Shimmer" } } }
then the arrived issues were fixed as in this and this. Then when running the emulator there were no build or any other issues.