Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered #59

Open
zainulabidin008 opened this issue May 17, 2022 · 3 comments

Comments

@zainulabidin008
Copy link

Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

@RecepBorekci
Copy link

I have the same issue. Tried plenty of fixes but none of them worked out. I guess the files are outdated. I'll create a new project and copy the main.dart codes and maybe the app icon.

@albercode10
Copy link

albercode10 commented Sep 19, 2022

The easy way to fix this is to delete android/ios folder and run: flutter create .

The hard way is to go to android/build.gradle and change:

dependencies {
     classpath 'com.android.tools.build:gradle:7.1.3' // use 7.1.3 or higher
}

then go to gradle/wrapper/graddle-wrapper.properties and change distributionUrl to something like this:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

@sanjorge01
Copy link

The easy way to fix this is to delete android/ios folder and run: flutter create .

The hard way is to go to android/build.gradle and change:

dependencies {
     classpath 'com.android.tools.build:gradle:7.1.3' // use 7.1.3 or higher
}

then go to gradle/wrapper/graddle-wrapper.properties and change distributionUrl to something like this:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

I do that and appear that. what i can do?

Could not find method classpath() for arguments [com.android.tools.build:gradle:7.1.3] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants