'Android - Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10
I have recently upgraded to Flutter 3.0. And later I encountered an issue after trying to run. After it finished downloading Gradle 6.7 and on starting Gradle Daemon, I got this error
Could not resolve all artifacts for configuration ':classpath'. Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10. Required by: project : > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10. > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'. > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'. > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
And as the way Flutter handles the error, I stuck in loop with it redownloading the gradle zip file on and on for reason I don't know and resulting the same error endlessly.
Solution 1:[1]
After followed @curioushikhov's answer by commented out jcenter() and replace it with mavenCentral() in android/build.gradle's repositories bracket, the error is gone.
Turns out the error is caused by connection timeout. I blame the server since my connection was fine. More similar errors occur after. I have to repeatedly run gradlew clean to completely get pass through it all.
(For Flutter user). Similar errors also occurred on Flutter's app build. The problem with Flutter is once it occurs, it simply removes, redownloads and run gradle from begin repeatedly, cause it to redownload everything to resolve the dependencies.
Solution 2:[2]
you used strcpy incorrectly as compiler log the error this is strcpy prototype
char * strcpy ( char * destination, const char * source );
if you want to copy from source to destination when source is a pattern -> you need to replace strcpy with sprintf or snprintf for more detail you can check this https://linux.die.net/man/3/snprintf
additional, you haven't allocateed for
char *usr;
char *encrypt;
char *upload;
use malloc or calloc for these things before use
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | stack underflow |
| Solution 2 |
