kebari
@kebari

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

android studioの初使用でエラーがでる

解決したいこと

android studioで初めての起動で、このようなエラーがでてしまい、Hello worldさえ表示できません。初心者のためどのようにすればよいのか見当もつかず、ネットで検索してもわかりませんでした。どうか解決策を教えてください。
環境:Android Studio Ladybug | 2024.2.1 Patch

発生している問題・エラー

Plugin [id: 'com.android.application', version: '8.7.2', apply: false] was not found in any of the following sources:

* Try:
> 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.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.7.2', apply: false] was not found in any of the following sources:

事前に調べたもの

0

2Answer

Androidエミュレータで実行しようとしているのか実機なのかわかりませんがOSバージョンが合ってないとか後はこの辺が該当しませんか?

0Like

Comments

  1. @kebari

    Questioner

    ありがとうございます。エミュレーターで、適当にPixe 8aで作っています。どの機種にすれば合うのでしょうか。
    記事の方法を試してみましたが、変化ありませんでした。

  2. リンク先の方法を試してダメならバージョンが合ってない可能性があると言うことです

    エミュレータのAndroidOSのバージョンと今作ろうとしているアプリのバージョンを確認してください

    エミュレータは tool -> AVD
    ここで ターゲットとAPIの数値をチェック

    今作ろうとしているアプリがどのバージョンで動作させようとしているかは
    Tool->SDK Appearance & Behavior -> System Setting -> Android SDKに
    初期値だとAndorid11 か 10にチェックが付いてるだけなので
    もし古いOS(古くはないけど)に対応させるならチェックを付けておきます

こたらによると、ネットワークに問題があるのではないかということです。
プロキシーなどの影響があるのではないでしょうか

0Like

Comments

  1. @kebari

    Questioner

    ありがとうございます。プロキシーがどのようになっていれば解決するのでしょうか。

  2. As the plugin it complains is present in the repository it says it searched in, this typically means that it is a problem on your network side.
    For example a Firewall or AntiVirus intervening, or most often that you need to use a Proxy to access the outworld but did not configure that Proxy for Gradle.

    問題となっているプラ​​グインは、検索したリポジトリ内に存在するため、通常はネットワーク側の問題であることを意味します。
    たとえば、ファイアウォールやウイルス対策ソフトウェアが介入している場合や、ほとんどの場合、プロキシを使用してアウトワールドにアクセスする必要があるのに、Gradle 用にそのプロキシを構成していない場合などです。

Your answer might help someone💌