سرمایه گذاری متفاوت در سال نو 🍎🌱 ۳۵٪ تخفیف نوروزی ➕ حضور رایگان در مسترمایند نخبگان صنعت نرم‌افزار 💻✅
۰ ثانیه
۰ دقیقه
۰ ساعت
۳ محمد علی
مشکل در وب ویو
جامعه فلاتر ایجاد شده در ۰۱ فروردین ۱۴۰۴

من موقعی که از وب ویو استفاده می‌کنم به این متن خطا می‌خورم:Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Your project is configured with Android NDK 23.1.7779620, but the following plugin(s) depend on a different Android NDK version:
- connectivity_plus requires Android NDK 25.1.8937393
- flutter_inappwebview_android requires Android NDK 25.1.8937393
- path_provider_android requires Android NDK 25.1.8937393
- shared_preferences_android requires Android NDK 25.1.8937393
- sqflite_android requires Android NDK 25.1.8937393
- webview_flutter_android requires Android NDK 25.1.8937393
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to E:\mohammad ali image\NEW\flutter profssor\flutter_ali_nike\android\app\build.gradle:

   android {
       ndkVersion = "25.1.8937393"
       ...
   }

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':webview_flutter_android'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
  > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

    If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* 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 1s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).
به جز این پکیج از چه پکیج دیگری و چطوری استفاده کنم که همین کار‌های استاد که با وب ویو انجام داد رو درست انجام بدهم وبه مشکل نخورم نمونه کد هم بفرستید ممنون می‌شم

نسخه ndk رو در مسیر  android/app/build.gradle تنظیم کنید:

 

   ndkVersion = "25.1.8937393"
یلدا محصلی ۰۴ فروردین ۱۴۰۴، ۰۷:۴۵

هر لینک رو که باز کنید در تب example نمونه کدش قابل مشاهده و استفاده هست.

1. https://pub.dev/packages/webview_flutter

2. https://pub.dev/packages/flutter_inappwebview

 

یلدا محصلی ۰۴ فروردین ۱۴۰۴، ۰۷:۴۹

نکته بعد: اگر میخواهید در استفاده از پکیج‌ها به مشکل نخورید، باید متن خطا رو بخونید! خیلی موارد با اپدیت تنظیمات پروژه‌تون حل خواهند شد. 

یلدا محصلی ۰۴ فروردین ۱۴۰۴، ۰۷:۵۱