升级到Java 8后无法使用crashlytics释放项目 [英] Can't release the project using crashlytics after upgrading to java 8

查看:83
本文介绍了升级到Java 8后无法使用crashlytics释放项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我移至 java 8 之后,由于 fabric crashlytics:在应用程序发布中出现此错误:

After I move to java 8, I get this error in app release, because of fabric crashlytics:

Could not determine the dependencies of task ':app:crashlyticsStoreDeobsRelease'.
> Task with path 'dexRelease' not found in project ':app'.

我正在使用 Android Studio 2.2 版本2.14.1 ,Android插件版本 2.2.0

I'm using Android Studio 2.2, Gradle version 2.14.1, Android plugin version 2.2.0

项目运行没有任何问题,但是我无法生成签名的apk!

The project run without any problem, but I can't generate signed apk!

我阅读了此帖子无法运行项目-Android Studio 2.0 Crashlytics问题无法确定任务':app:crashlyticsStoreDeobsDebug'的依赖项,如果我启用了防护功能,但可以回答没帮我。

I read this post Can't run project - Android Studio 2.0 Crashlytics issues and Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug' if I enable the proguard but answer didn't helped me.

这是我的gradle文件:

This is 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' }
}


android {
 compileSdkVersion 24
 buildToolsVersion "24.0.2"

 defaultConfig {
    applicationId "..."
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 17
    versionName "0.14.1"

    jackOptions {
        enabled true
    }
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

  dexOptions {
    javaMaxHeapSize "3g"
  }

  signingConfigs {
    release {
        storeFile file("....jks")
        storePassword "..."
        keyAlias "..."
        keyPassword "..."
    }
  }

 buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        shrinkResources true

        debuggable true
        signingConfig signingConfigs.release
    }

    debug{
        debuggable true
        //applicationIdSuffix ".debug"
    }
 }
 }

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')

//Material edit text
compile 'com.rengwuxian.materialedittext:library:2.1.4'
//Circle progress bar
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.1.0'
//a divider for recyclerview
compile 'com.yqritc:recyclerview-flexibledivider:1.2.9'


//Field and method binding for Android views
compile 'com.jakewharton:butterknife:7.0.1'
//crash reporting and streamline solution for distributing apps
   compile('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
      transitive = true;
   }

//LeakCanary
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'

compile('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
    transitive = true;
}
compile project(':core')
}

apply plugin: 'com.google.gms.google-services'


推荐答案

我从此链接检查结构工具版本

I check the fabric tools version from this link

https ://s3.amazonaws.com/fabric-artifacts/public/io/fabric/tools/gradle/maven-metadata.xml

然后我用了较低版本的 classpath'io.fabric.tools:gradle:1.25.4'

Then I used a lower version classpath 'io.fabric.tools:gradle:1.25.4'

这篇关于升级到Java 8后无法使用crashlytics释放项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆