【解決方法】受信中: 複数のパッケージのプロジェクトを構成する際に問題が発生しました


久しぶりに自分のプロジェクトの 1 つに取り組んでいたので、フラッター コードとパッケージも更新しました。 エラーが表示されるようになりました:「パッケージ名」のプロジェクトの構成中に問題が発生しました。 最初はクラウド 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

私が試したこと:

これについても同じ解決策を試しましたが、解決できませんでした。 私はすでに次のような他の方法をいくつか試しました。

すべての androidxml からパッケージ “namespace” を削除します。 アプリ レベルの Android ファイルに名前空間を追加します。 依存関係を : classpath ‘com.android.tools.build:gradle:8.2.0’ に更新します。 // 新しいバージョンのクラスパス “org.jetbrains. kotlin:kotlin-gradle-plugin:$kotlin_version” クラスパス ‘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をコピーしました