Can anyone help me to solve my error?

359 views
Skip to first unread message

Dishant Chudasama

unread,
Jul 24, 2021, 2:18:17 AM7/24/21
to Flutter Development (flutter-dev)
                                                                       
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
A problem occurred configuring root project 'android'.                  
> Could not resolve all artifacts for configuration ':classpath'.       
   > Could not resolve com.android.tools.build:gradle:3.5.0.            
     Required by:                                                       
         project :                                                      
      > Could not resolve com.android.tools.build:gradle:3.5.0.         
               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 3s                                                      
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                         4.4s
Exception: Gradle task assembleDebug failed with exit code 1


This the error when i run my any flutter project to android platform

Bridget Kelly O'Sheehan

unread,
Jul 24, 2021, 4:33:00 AM7/24/21
to Flutter Development (flutter-dev)
Hi,

Think i've fixed it, what its highlighting issue its a 'plugin' which is not the same version, and your updated version of gradle, they are two different things


I've changed this section to - 

dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
}

and error has gone, but now got another error showing instead, hope this works

Reply all
Reply to author
Forward
0 new messages