如何获得引导程序的输出?

时间:2019-02-05 10:42:43

标签: javascript html css angular bootstrap-4

我遇到错误

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="io.musicschool.app.NoteTrainerActivity">

    <ImageView
        android:id="@+id/intervalNoteImage"
        android:layout_width="0dp"
        android:layout_height="200dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:scaleType="fitXY"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/c4" />

    <ScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="30dp"
        android:clipToPadding="false"
        android:fillViewport="false"
        android:scrollbars="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/intervalNoteImage"
        app:layout_constraintVertical_bias="0.0">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <GridLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:columnCount="3"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/noteImage"

                >

                <Button
                    android:id="@+id/unison_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_columnWeight="1"
                    android:text="Unison"
                    android:textAllCaps="false"

                    />

                <Button
                    android:id="@+id/min2nd_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="1"
                    android:layout_columnWeight="1"
                    android:layout_row="0"
                    android:text="Min 2nd"
                    android:textAllCaps="false"/>

                <Button
                    android:id="@+id/maj2nd_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="2"
                    android:layout_columnWeight="1"
                    android:layout_row="0"
                    android:text="Maj 2nd"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/min3rd_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="0"
                    android:layout_columnWeight="1"
                    android:layout_row="1"
                    android:text="Min 3rd"
                    android:textAllCaps="false"


                    />

                <Button
                    android:id="@+id/maj3rd_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="1"
                    android:layout_columnWeight="1"
                    android:layout_row="1"
                    android:text="Maj 3rd"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/per4th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="2"
                    android:layout_columnWeight="1"
                    android:layout_row="1"
                    android:text="Per 4th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/aug4th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="0"
                    android:layout_columnWeight="1"
                    android:layout_row="2"
                    android:text="Aug 4th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/dim5th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="1"
                    android:layout_columnWeight="1"
                    android:layout_row="2"
                    android:text="Dim 5th"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/per5th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="2"
                    android:layout_columnWeight="1"
                    android:layout_row="2"
                    android:text="Per 5th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/min6th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="0"
                    android:layout_columnWeight="1"
                    android:layout_row="3"
                    android:text="Min 6th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/maj6th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="1"
                    android:layout_columnWeight="1"
                    android:layout_row="3"
                    android:text="Maj 6th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/min7th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="2"
                    android:layout_columnWeight="1"
                    android:layout_row="3"
                    android:text="Min 7th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/maj7th_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="0"
                    android:layout_columnWeight="1"
                    android:layout_row="4"
                    android:text="Maj 7th"
                    android:textAllCaps="false"
                    />

                <Button
                    android:id="@+id/oct_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_column="1"
                    android:layout_columnWeight="1"
                    android:layout_row="4"
                    android:text="Octave"
                    android:textAllCaps="false"
                    />
            </GridLayout>
        </LinearLayout>
    </ScrollView>

</android.support.constraint.ConstraintLayout>

在开发应用程序时。我安装了:

    ERROR in ./src/styles.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./src/styles.css)
    Module build failed (from ./node_modules/postcss-loader/src/index.js):
    Error: Failed to find '../node_modules/bootstrap/scss/bootstrap'
      in [
        C:\Users\sfssda\OnlineShoppingCartInA6\DeepCart\src
      ]
 at resolveModule.catch.catch (C:\Users\sfssda\OnlineShoppingCartInA6\DeepCart\node_modules\postcss-import\lib\resolve-id.js:35:13)
    at <anonymous>
     i 「wdm」: Failed to compile.

app.module.ts 的导入为

npm install --save @ng-bootstrap/ng-bootstrap
npm i bootstrap-scss

styles.css 具有

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

1 个答案:

答案 0 :(得分:0)

您的 angular.json 文件应具有这样的bootstrapp scss / css

"architect": {
    "build": {
        "options": {
            "styles": [
                ... OTHER SCSS/CSS
                "node_modules/bootstrap/scss/bootstrap.scss",
                "node_modules/bootstrap/scss/bootstrap-grid.scss",
                "src/styles.scss"
            ]
        ...