Android Studio: Error:org.gradle.tooling.BuildException: Failed to generate v1 signature

前端 未结 2 2064
南笙
南笙 2020-12-21 01:38

The problem is arising in Android Studio 3.0.

When I create a new project, everything works fine but after sometime, the error

Error:org.gradle.to

相关标签:
2条回答
  • 2020-12-21 01:58

    Try add the following to build.gradle and build it again.

    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    
    0 讨论(0)
  • 2020-12-21 02:01

    I found I was able to fix this issue by using the following command line to build a new key file, as desribed at https://developer.android.com/studio/publish/app-signing.html:

    keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
    

    Specifically, I believe the problem is that the default has changed from RSA to DSA at some point, and the tools don't work correctly with large DSA keys.

    0 讨论(0)
提交回复
热议问题