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'
}
}
Related
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?
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
}
Once a while while building my project i keep getting:
Error:Gradle: Execution failed for task ':app:packageProductionDebug'.
> value (115422) > 0x0000ffff
This happens for 30%-50% attempts to run my project regardless of device.
I've tried to clean my project but still no luck.
The value (115422)seems to be changing but the hex value remains the same.
EDIT
My 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' }
}
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.myapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "0.1"
buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
}
dexOptions {
javaMaxHeapSize "4g"
}
testOptions {
unitTests.returnDefaultValues = true
}
/* set file name depending on build variant*/
applicationVariants.all { variant ->
variant.outputs.each { output ->
def filename = applicationId
if (variant.buildType.isDebuggable()) {
filename += '-debug';
} else {
filename += '-vc-' + variant.versionCode
}
filename += '.apk'
output.outputFile = new File(
output.outputFile.parent,
filename
)
}
}
productFlavors{
staging{
applicationId = 'com.myapp.beta'
manifestPlaceholders = [activityLabel:"myapp.STAGING"]
multiDexEnabled true
}
production {
applicationId = 'com.myapp'
manifestPlaceholders = [activityLabel:"myapp"]
multiDexEnabled true
}
instrTest {
applicationId = 'com.myapp'
manifestPlaceholders = [activityLabel:"myapp"]
multiDexEnabled true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
}
}
sourceSets {
main{
java.srcDirs = ['src/main/java']
assets.srcDirs = ['src/main/assets']
}
productionDebug{
assets.srcDirs = ['src/main/assets', 'src/test/assets']
}
stagingDebug{
assets.srcDirs = ['src/main/assets', 'src/test/assets']
}
staging {
java.srcDirs = ['src/staging/java']
}
production{
java.srcDirs = ['src/production/java']
}
instrTest{
assets.srcDirs = ['src/main/assets', 'src/test/assets']
java.srcDirs = ['src/instrTest/java']
manifest.srcFile 'src/instrTest/AndroidManifest.xml'
res.srcDirs = ['src/instrTest/','src/instrTest/res']
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:23.+'
compile 'com.android.support:recyclerview-v7:23.+'
compile 'com.android.support:support-v4:23.+'
compile 'com.android.support:cardview-v7:23.+'
compile 'com.android.support:support-annotations:22.2.0'
compile 'com.android.support:design:22.2.1'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.guava:guava:19.0-rc1'
compile 'com.urbanairship.android:urbanairship-sdk:6.3.+'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.10'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'biz.source_code:base64coder:2010-09-21'
compile 'org.iban4j:iban4j:3.0.4'
compile 'com.romainpiel.shimmer:library:1.4.0#aar'
compile 'org.apmem.tools:layouts:1.9#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.tsums.androidcookiejar:androidcookiejar:1.0#aar'
compile 'com.squareup.okhttp3:okhttp:3.0.0-RC1'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
testCompile 'junit:junit:4.12'
testCompile 'org.easytesting:fest:1.0.16'
testCompile ('com.squareup:fest-android:1.0.8'){
exclude module: 'support-v4'
}
testCompile 'org.robolectric:robolectric:3.0'
testCompile "org.mockito:mockito-core:1.+"
compile project(':cropimage')
compile project(':viewpagerindicator')
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
}
I've also tried to run the tasks from terminal with --stack option and got:
Caused by: java.lang.IllegalArgumentException: value (172858) > 0x0000ffff
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
at com.android.builder.internal.packaging.zip.ZipField.write(ZipField.java:228)
at com.android.builder.internal.packaging.zip.StoredEntry.toHeaderData(StoredEntry.java:651)
at com.android.builder.internal.packaging.zip.ZFile.writeEntry(ZFile.java:944)
at com.android.builder.internal.packaging.zip.ZFile.update(ZFile.java:858)
at com.android.builder.internal.packaging.zip.ZFile.close(ZFile.java:900)
at com.android.builder.internal.packaging.zfile.ApkZFileCreator.close(ApkZFileCreator.java:128)
at com.google.common.io.Closer.close(Closer.java:214)
at com.android.builder.internal.packaging.IncrementalPackager.close(IncrementalPackager.java:343)
at com.google.common.io.Closer.close(Closer.java:214)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:448)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doIncrementalTaskAction(PackageAndroidArtifact.java:580)
at com.android.build.gradle.tasks.PackageApplication.doIncrementalTaskAction(PackageApplication.java:82)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:108)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:244)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:231)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 14 more
I am not certain but I'm pretty sure it's a bug in Android Studio 2.2, and do not have enough reputation to make a comment. Killing Java(.exe) fixes it.
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'
I have a android library project from which i created AAR file. I have added that AAR file into my application project, while running i get the following exception:
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.creatrixone.customcomponents.LoadMoreListView" on path:
DexPathList[[zip file "/data/app/com.creatrixcampus-1.apk"],
nativeLibraryDirectories=[/data/app-lib/com.creatrixcampus-1, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.view.LayoutInflater.createView(LayoutInflater.java:559)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
I updated both Library and Application project gradle file after visiting below link,
Android Library AAR depending on another library
but no use,
this is my updated library build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
version '1.1.1'
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.0'
compile 'com.koushikdutta.ion:ion:2.1.7'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
//session handelling using JWT
compile 'io.jsonwebtoken:jjwt:0.6.0'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0#aar'
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
//applicationId "com.creatrixone"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.1.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
productFlavors {
}
dexOptions {
incremental true
}
}
this is my updated project build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
maven { url "${System.env.HOME}/.m2/repository" }
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId 'com.creatrixcampus'
minSdkVersion 15
targetSdkVersion 23
versionCode 20160504
versionName "1.5.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.1'
compile project(':photoViewerLibrary')
compile project(':multipleImagePick')
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile ':creatrixone1_1#aar'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.alamkanak:android-week-view:1.2.1'
compile 'com.google.zxing.client.android:barcode_1.0:1.1.0#aar'
compile 'com.google.zxing:android-integration:3.2.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'xyz.danoz:recyclerviewfastscroller:0.1.3'
//session handelling using JWT
compile 'io.jsonwebtoken:jjwt:0.6.0'
compile 'com.koushikdutta.ion:ion:2.1.7'
}