You have not accepted the license agreements of the following SDK components
阿新 • • 發佈:2017-10-31
窗口 exce wrong component iss sdk export comm port
問題出現在配完環境,生成apk的時候
>ionic build android
問題描述:
BUILD FAILED Total time: 9 mins 18.732 secs FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project ‘android‘. > You have not accepted the license agreements of the following SDK components: [Android SDK Platform 25]. 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 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project ‘android‘. > You have not accepted the license agreements of the following SDK components: [Android SDK Platform 25]. 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 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
分析:根據字義是沒有獲取到license的問題
解決方案:
在cmd命令窗口下,先cd到 ***\Android\android-sdk\tools\bin下
運行
sdkmanager --update
如果不行就
sdkmanager --licenses
會有
Accept? (y/N): y
接受 y 回車就行了
然後再打包就OK了^.^
You have not accepted the license agreements of the following SDK components