Launching lib\main.dart on SM A127F in debug mode... Exception in thread "main" java.lang.RuntimeException: Could not load wrapper properties from 'C:\Users\DELL\Downloads\Online Sports Fitness Code 31 Dec\Online Spo rts Fitness\android\gradle\wrapper\gradle-wrapper.properties'. at org.gradle.wrapper.WrapperExecutor.(WrapperExecutor.java:64) at org.gradle.wrapper.WrapperExecutor.forWrapperPropertiesFile(WrapperExecutor.java:47) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:60) Caused by: java.net.URISyntaxException: Illegal character in path at index 60: https://services.gradle.org/distributions/gradle-7.2-all.zip at java.base/java.net.URI$Parser.fail(URI.java:2913) at java.base/java.net.URI$Parser.checkChars(URI.java:3084) at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3166) at java.base/java.net.URI$Parser.parse(URI.java:3114) at java.base/java.net.URI.(URI.java:600) at org.gradle.wrapper.WrapperExecutor.readDistroUrl(WrapperExecutor.java:81) at org.gradle.wrapper.WrapperExecutor.prepareDistributionUri(WrapperExec at org.gradle.wrapper.WrapperExecutor.readDistroUrl(WrapperExecutor.java :81) at org.gradle.wrapper.WrapperExecutor.prepareDistributionUri(WrapperExec utor.java:70) at org.gradle.wrapper.WrapperExecutor.(WrapperExecutor.java:57) ... 2 more Running Gradle task 'assembleDebug'... 1,478ms Exception: Gradle task assembleDebug failed with exit code 1 getting this error
CodePudding user response:
The distributionUrl should be like this:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
Note: You will need to escape the colon.
CodePudding user response:
Try replacing the whole content of gradle-wrapper.properties with this:
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
And after this, do a fresh gradle sync. Also, check if your AGP is on latest version or not.
