This is what my gradle looks like, I have commented out the problem line (Updated with full gradle code)
data-layer
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':models')
testCompile 'junit:junit:4.12'
compile "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion"
compile "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
compile "io.reactivex.rxjava2:rxjava:$rootProject.rxjavaVersion"
compile "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofitRxjava2Version"
compile "com.google.dagger:dagger:$rootProject.daggerVersion"
//compile "android.arch.persistence.room:runtime:$rootProject.roomVersion"
}
domain-layer
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':data-layer')
testCompile 'junit:junit:4.12'
}
presentation-layer
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.admin.umbrella"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':domain-layer')
compile 'com.android.support:appcompat-v7:26.+'
compile "com.android.support.constraint:constraint-layout:$rootProject.constraintLayoutVersion"
compile "com.android.support:cardview-v7:$rootProject.cardViewVersion"
compile "com.android.support:recyclerview-v7:$rootProject.recyclerviewVersion"
compile "com.jakewharton:butterknife:$rootProject.butterknifeVersion"
compile "com.android.support:design:$rootProject.designVersion"
compile "com.google.dagger:dagger:$rootProject.daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
testCompile 'junit:junit:4.12'
}
root
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
constraintLayoutVersion = '1.0.2'
cardViewVersion = '26.1.0'
recyclerviewVersion = '26.1.0'
butterknifeVersion = '8.8.1'
designVersion = '26.1.0'
daggerVersion = '2.11'
roomVersion = '1.0.0-beta1'
retrofitRxjava2Version = '2.3.0'
retrofitVersion = '2.3.0'
rxjavaVersion = '2.0.1'
}
I am working with MVP and have each layer split into different modules. In my data-layer when I try to import room library I get the error
"Error:Module 'Umbrella:data-layer:unspecified' depends on one or more Android Libraries but is a jar"
I don't fully understand what that means, What steps can i take to investigate and solve this problem?
Related
this is my gradle.build code im getting issues like library not found and update versions like that after i have changed to the latest version also im getting that its not supported im a beginner and im creating an chatting app for my final year project.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "afterapps.com.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
provided 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
}
apply plugin: 'com.google.gms.google-services'
https://github.com/MahmoudAlyuDeen/FirebaseIM
Those dependencies are in general quite outdated ...and the Gradle wrapper should be 5.4.1.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://clojars.org/repo/" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
com.android.support only works with versions of Firebase libraries, which do not use androidx:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.afterapps.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
// https://firebase.google.com/support/release-notes/android#2019-06-17
//noinspection GradleDependency
implementation 'com.google.firebase:firebase-messaging:19.2.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compileOnly 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
Well i have some weird kind of run error, There is no error in the code neither in the gradle build. Get me through this
here is my app level build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.kpitb.manxoor.kpitbforpocket"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:appcompat-v7:26+'
compile 'com.github.bumptech.glide:glide:4.6.1'
compile 'com.android.support:palette-v7:26+'
compile 'com.android.support:cardview-v7:26+'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:compiler:4.6.1'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-firestore:11.8.0'
compile 'id.zelory:compressor:2.1.0'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.twitter.sdk.android:twitter:3.3.0#aar'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
and my project level build
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
while compiling the app Gradle build show this error.
Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
Cannot load Jill from build tools.
Use like this :
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.kpitb.manxoor.kpitbforpocket"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:26+'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.android.support:palette-v7:26+'
implementation 'com.android.support:cardview-v7:26+'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
implementation 'com.android.support:recyclerview-v7:26+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.twitter.sdk.android:twitter:3.3.0#aar'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
and my project level build
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I recently had a lot of problems trying to debug in my application when using Retrolambda, because of that I wanted to include Jack on my Gradle for debugging purposes.
jackOptions {
enabled true
}
Because of that, I have been going through this error and I still without finding a way to solve it.
Jackson : NoSuchMethodError for com.google.common.base.Preconditions.checkState
I have check different posts looking for a solution:
Android Studio: Gradle - build fails -- Execution failed for task ':dexDebug'
Lambda expressions crash with IncompatibleClassChangeError in Android when using jack
A larger heap for the Gradle daemon is recommended for running jack
But none of the solutions have fixed my problems. Right now my Gradle looks like:
buildscript {
ext {
use_jack = true
dagger_version = "2.8"
firebase_version = "9.6.1"
rx_version = "2.0.3"
rx_firebase_version = "1.0.0"
rx_android_version = "2.0.1"
gson_version = "2.8.0"
butterkinfe_version = "8.4.0"
support_version = "25.0.0"
target_sdk_version = 24
}
}
apply plugin: 'com.android.application'
if (!use_jack) { //Backport to apt / RetroLambda
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.neenbedankt.android-apt'
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.myaplicattion"
minSdkVersion 15
targetSdkVersion project.properties.target_sdk_version
versionCode 1
versionName "0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled use_jack
}
}
buildTypes {
debug {
minifyEnabled false
testCoverageEnabled = true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//Support
compile "com.android.support:appcompat-v7:$support_version"
compile "com.android.support:design:$support_version"
//Util
compile 'com.intellij:annotations:12.0'
compile 'com.jakewharton.timber:timber:4.3.1'
compile "com.jakewharton:butterknife:$butterkinfe_version"
if (use_jack) annotationProcessor "com.jakewharton:butterknife-compiler:$butterkinfe_version"
else apt "com.jakewharton:butterknife-compiler:$butterkinfe_version"
compile 'com.github.mukeshsolanki:country-picker-android:1.1.6'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
//Glide
compile 'com.github.bumptech.glide:glide:3.7.0'
//Firebase
// compile "com.firebaseui:firebase-ui-database:0.4.0"
compile "com.google.firebase:firebase-storage:$firebase_version"
compile "com.google.firebase:firebase-messaging:$firebase_version"
compile "com.google.firebase:firebase-common:$firebase_version"
compile "com.google.firebase:firebase-auth:$firebase_version"
compile "com.google.firebase:firebase-core:$firebase_version"
compile "com.google.firebase:firebase-database:$firebase_version"
compile "com.google.firebase:firebase-crash:$firebase_version"
compile "com.github.frangsierra:rx2firebase:$rx_firebase_version"
//GSON
compile "com.google.code.gson:gson:$gson_version"
//Facebook
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
//Dagger
compile "com.google.dagger:dagger:$dagger_version"
if (use_jack) annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
else apt "com.google.dagger:dagger-compiler:$dagger_version"
//Rx
compile "io.reactivex.rxjava2:rxjava:$rx_version"
compile "io.reactivex.rxjava2:rxandroid:$rx_android_version"
//Test
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support.test:runner:0.5'
}
apply plugin: 'com.google.gms.google-services'
And my appgradle :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
mavenLocal()
maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here i add more information ! i have met this question when i import the project into the Android Studio! Could you help me to make it think you very much!`````````````````````````````````````````````````````````
Caused by: org.gradle.api.UncheckedIOException: Could not normalize path for file '\\ ...'.
at org.gradle.api.internal.file.AbstractFileResolver.normalise(AbstractFileResolver.java:141)
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:83)
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:63)
at org.gradle.api.internal.file.AbstractFileResolver.convertObjectToURI(AbstractFileResolver.java:177)
at org.gradle.api.internal.file.AbstractFileResolver.resolveUri(AbstractFileResolver.java:168)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.getUrl(DefaultMavenArtifactRepository.java:65)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated.getUrl(Unknown Source)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.createRealResolver(DefaultMavenArtifactRepository.java:97)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.createResolver(DefaultMavenArtifactRepository.java:93)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolveIvyFactory.create(ResolveIvyFactory.java:91)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.createComponentSource(DefaultArtifactDependencyResolver.java:114)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.access$100(DefaultArtifactDependencyResolver.java:56)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:81)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:78)
at org.gradle.internal.Transformers$4.transform(Transformers.java:137)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:78)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:41)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:39)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyConfigurationResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfigurationResolver.java:52)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:43)
... 83 more
Caused by: java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428)
at java.io.File.getCanonicalPath(File.java:618)
at java.io.File.getCanonicalFile(File.java:643)
at org.gradle.api.internal.file.AbstractFileResolver.normalise(AbstractFileResolver.java:98)
... 112 more
here is the gradle
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "io.itit.ititeducation"
minSdkVersion 19
targetSdkVersion 21
versionCode 43
versionName "1.5.3"
}
buildTypes {
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
android.applicationVariants.all {
variant ->
variant.outputs.each {
output ->
output.outputFile = new File(output.outputFile.parent, "科达智慧教育_io.itit.ititeducation_v"
+ defaultConfig.versionName + "_" + defaultConfig.versionCode + ".apk");
}
}
dexOptions {
maxProcessCount 8
javaMaxHeapSize "4g"
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
repositories {
maven { url '// ...' }
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.mikepenz:materialdrawer:5.1.2#aar') {
transitive = true
}
compile files('libs/zxing.jar')
compile files('libs/jg_filter_sdk_1.1.jar')
compile files('libs/wup-1.0.0.E-SNAPSHOT.jar')
compile files('libs/Xg_sdk_v2.42_20160111_1539.jar')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.8'
compile 'com.github.afollestad.material-dialogs:commons:0.8.5.8'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'me.imid.swipebacklayout.lib:library:1.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'cn.trinea.android.common:trinea-android-common:4.2.15'
compile 'com.github.orhanobut:logger:1.12'
compile 'org.xutils:xutils:3.3.25'
compile 'de.greenrobot:greendao:2.1.0'
compile 'com.github.rey5137:material:1.2.2'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'in.srain.cube:ultra-ptr:1.0.11'
compile 'com.romainpiel.shimmer:library:1.4.0#aar'
compile 'com.mikepenz:iconics-core:2.5.10#aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original#aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1#aar'
compile 'com.github.qiujuer:genius:2.4.0'
compile 'com.tonicartos:superslim:0.4.13'
compile 'com.github.dexafree:materiallist:3.2.+'
compile 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
compile 'com.liulishuo.filedownloader:library:0.2.0'
compile 'com.duwei.pinwheel:pinwheel:0.1'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.umeng.analytics:analytics:latest.integration'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.panwrona:DownloadProgressBar:1.1'
compile 'com.github.traex.rippleeffect:library:1.3'
compile files('libs/photo_library.jar')
compile files('libs/videocache.jar')
compile project(':videolib')
compile project(':itit_lib')
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
}
the other
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
the other three modules
1
apply plugin: 'com.android.library'
dependencies {
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
jniLibs.srcDirs = ['libs']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.alibaba:fastjson:1.2.8'
compile files('libs/gson-2.2.4.jar')
compile 'com.github.lazylibrary:lazylibrary:1.0.2'
compile 'com.android.support:design:23.3.0'
compile 'com.github.orhanobut:logger:1.12'
compile 'cn.trinea.android.common:trinea-android-common:4.2.15'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.8'
compile 'com.github.afollestad.material-dialogs:commons:0.8.5.8'
compile 'com.mikepenz:iconics-core:2.5.10#aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original#aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1#aar'
compile 'com.github.rey5137:material:1.2.2'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile('com.mikepenz:materialdrawer:5.1.2#aar') {
transitive = true
}
compile project(':videolib')
}
3
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'de.greenrobot:greendao-generator:2.1.0'
}
remove "maven { url '// ...' }" line from your build.gradle
repositories {
**maven { url '// ...' }**
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
My Android app is running on Android Lollipop and Marshmallow version but when i run it on API 19 it gives exception
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions exception
I am not using any firebase in may application. I search some related problem on Internet and apply in my app but right now i could not found any solution. Please help me
below is my top gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
below is my app gradle file
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.dp.needdepartmentalstore"
minSdkVersion 14
targetSdkVersion 23
versionCode 29
versionName "5.16"
multiDexEnabled true
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "16c778cf-8ebc-47a8-9ba8-6815f0223a0e",
onesignal_google_project_number: "253919422974"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.mikepenz:actionitembadge:3.1.8#aar') {
transitive = true
}
compile('com.weiwangcn.betterspinner:library-material:1.1.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
compile project(':niceSpinner')
compile files('libs/PGSDK_v1.0.jar')
compile files('libs/App42_ANDROID_SDK_3.8.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('com.instabug.library:instabugsupport:1+') {
exclude group: 'com.mcxiaoke.volley', module: 'library'
}
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.bignerdranch.android:expandablerecyclerview:2.0.3'
compile 'com.marshalchen.ultimaterecyclerview:library:0.3.18'
compile 'com.miguelcatalan:materialsearchview:1.3.0'
compile 'com.wdullaer:materialdatetimepicker:2.0.2'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.shell-software:fab:1.1.2'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
//compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.intuit.sdp:sdp-android:1.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.android.support:multidex:1.0.1'
}
apply plugin: 'com.google.gms.google-services'