الاستلام: حدثت مشكلة أثناء تكوين المشروع لحزم متعددة خاصة بي


بعد فترة طويلة كنت أعمل على أحد مشاريعي، لذلك قمت بتحديث كود الرفرفة والحزم الخاصة بي أيضًا. بدأت أتلقى الخطأ: حدثت مشكلة أثناء تكوين المشروع لـ “اسم الحزمة”. في البداية، كان الأمر مخصصًا لبرامج Cloud Firestore وFirebase ولكن بعد ذلك قمت بإعادة تثبيت Firebase، لذلك تم حل هذه المشكلة، ثم حصلت على Shareplus وعدد قليل من الحزم الأخرى التي تم حلها عن طريق إضافة مساحة اسم في build.gradle المحدد للحزمة ولكن ما زلت أتلقى حزم أخرى واحدة تلو الأخرى. الآن لدي لحزمة video_player.

يبدو الخطأ إلى حد ما مثل هذا في معظم الحالات

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':video_player_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
Exception: Gradle task assembleDebug failed with exit code 1

ما حاولت:

لقد حاولت نفس الحل لهذا ولكن لم أتمكن من حلها. لقد قمت بالفعل بتجربة بعض الطرق الأخرى مثل:

إزالة حزمة “مساحة الاسم” من جميع ملفات androidxmls إضافة مساحة الاسم في ملف android على مستوى التطبيق الخاص بي تحديث التبعيات إلى: classpath ‘com.android.tools.build:gradle:8.2.0’ // تم التحديث إلى إصدار أحدث classpath “org.jetbrains. kotlin:kotlin-gradle-plugin:$kotlin_version” classpath ‘com.google.gms:google-services:4.4.0’ // المكون الإضافي لخدمات Google

تم تثبيت Java 17 وإضافة هذا السطر في gradle.properties: org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home

تمت إضافة مساحة الاسم في مجلد المشروع الفرعي مؤخرًا في buildgradle العام

ماذا يمكنني أن أفعل وكيف يمكنني التأكد من حل هذا الخطأ عالميًا؟

コメント

タイトルとURLをコピーしました