-
Notifications
You must be signed in to change notification settings - Fork 0
DNET_AndroidDebuggingTroubleshoot
nishi_74322014 edited this page Sep 11, 2026
·
1 revision
良くハマるので。
FAILURE: Build failed with an exception.
Warning: License for package Android SDK Build-Tools 26.0.2 not accepted.
Checking the license for package Android SDK Platform 26 in C:\Program Files (x86)\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 26 not accepted.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26, Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
-
CMDを管理者実行
-
cd
cd C:\Program Files (x86)\Android\android-sdk\tools\bin -
sdkmanager --list
sdkmanager --list Available Packages: Path | Version | Description ------- | ------- | ------- ・・・ platforms;android-26 | 2 | Android SDK Platform 26 | platforms\android-26\ ・・・ -
sdkmanager "path"
sdkmanager "platforms;android-26" Accept? (y/N): y done
- CI環境でandroid-sdkのライセンスに同意する - Qiita
https://qiita.com/akym03/items/7646732b220412b085b7
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Failed to install the following SDK components:
[Android SDK Build-Tools 26.0.2]
The SDK directory (C:\Program Files (x86)\Android\android-sdk) is not writeable,
please update the directory permissions.
下記の参考情報に、
「config.xmlとpackage.jsonにversion / specの^または〜が含まれていないことを確認」
とある。
config.xmlとpackage.jsonを修正してみるがダメ。
「please update the directory permissions.」とあったので、愚直に環境再構築で復旧
(Android StudioとSDKをアンインストールしてfolder全削除後に再インストール)。
- [SOLVED] Ionic package build android - ionic - Ionic
https://forum.ionicframework.com/t/solved-ionic-package-build-android/107042 - [0.0.39] "ionic platform add android" fails · Issue #302 · ionic-team/ionic-app-scripts
https://github.com/ionic-team/ionic-app-scripts/issues/302
Launching for android (This may take a while)...
App successfully launched
Attaching to android
Unable to find adb. Please ensure it is in your PATH and re-open Visual Studio Code
-
PATH環境変数の再設定(
Cordova Tools Extensionの該当節)
(Android Studio再インストールでSDKのパスが変わっていた)。 - C:\Program Files (x86) ---> C:\Users\xxxx\AppData\Local\Android\sdk
- Unable to attach debugger to Android emulator · Issue #126 · Microsoft/vscode-cordova
https://github.com/Microsoft/vscode-cordova/issues/126
移行メモ
- 元 Wiki には「エラー・メッセージ」「解決」「参考」という見出しがそれぞれ 複数あり GitHub Wiki でアンカが衝突するため、括弧で文脈を補って一意にした。
- 元 Wiki の行頭空白によるエラー・メッセージやコマンドは、 フェンス付きコードブロックにした。
- マイクロソフト系技術情報 Wiki への URL リンクは、 移行済みの Cordova Tools Extension に張り替えた。
- 本ページは 2018 年時点の Cordova / Android SDK に関する情報である。
Tags: 移行, Android, デバッグ, トラブルシュート, Cordova, Android SDK, Visual Studio Code, adb
このWikiは「Open棟梁Project」,「OSSコンソーシアム 開発基盤部会」によって運営されています。