I am trying to use flutter_webview_plugin to implement webview in my flutter application but it pops up the error while running. Details given below. But if I run simple hello world app it runs successfully.
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
void main() => runApp(MaterialApp(
home: MyApp(),
debugShowCheckedModeBanner: false,
darkTheme: ThemeData.dark(),
)
);
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return WebviewScaffold(
appBar: AppBar(
title: Text('KnowledgeSuttra',
textAlign: TextAlign.center,
)
),
url: 'www.knowledgesuttra.com',
);
}
}
Errors I am getting * Error running Gradle: ProcessException: Process "J:\FlutterStudioProjects\knowledge_suttra\android\gradlew.bat" exited abnormally:
Configure project :app NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to F:\AndroidSDK\ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Configure project :flutter_webview_plugin NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to F:\AndroidSDK\ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
WARNING: The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '27.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Checking the license for package Android SDK Platform 25 in F:\AndroidSDK\licenses Warning: License for package Android SDK Platform 25 not accepted.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':flutter_webview_plugin'.
Failed to install the following Android SDK packages as some licences have not been accepted. platforms;android-25 Android SDK Platform 25 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: F:\AndroidSDK
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 5m 19s Command: J:\FlutterStudioProjects\knowledge_suttra\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
I expect to load webview successfully. Thanks in adv