Tag Archives: html

error: resource android:attr/lStar not found [How to Solve]

When integrating androidx.activity:activity in Android projects, an error is reported.xxx/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:5395: error: resource android:attr/lStar not found.error: failed linking references.

Analysis.
1. gradle introduces the configuration.

    def activity_version = "1.4.0-alpha02"

    // Java language implementation
    implementation "androidx.activity:activity:$activity_version"
    // Kotlin
    implementation "androidx.activity:activity-ktx:$activity_version"

2. Project gradle configuration:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.1"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

3. The project is a brand-new project and kotlin has not been introduced, so it is not a kotlin version number problem.

4. After modifying the compilesdkversion and targetsdkversion to 31, the operation is normal.

IMG tag onerror event resolves infinite loop error reporting

Problem Description:

problem: the SRC picture in img tag failed to load, and a fragment icon will appear in the original picture position, which is very unpleasant. How to be more beautiful


Cause analysis:

because the reverse display resource cannot be found or the path does not exist, it will be processed according to the IMG default processing method


Solution:

1. Find a default picture to replace

2. Trigger with onerror event

3. The oneror event is triggered repeatedly

<img src="url" onerror= "this.οnerrοr='';this.src='static/images/nop.svg'">

Can be solved

INFO Starting development server…. ERROR Error: Rule can only have one resource source (provided

Problem
when writing a Vue cli project, the following problems occurred when running NPM run serve

after consulting the data, you know that you have installed the latest version of SASS loader, which may be because the version is too new, Incompatible with project plug-ins or dependencies

solution
Enter
in the terminal, delete the newer version NPM uninstall sass loader
install the lower version NPM install sass- [email protected] –save-dev

About JS error uncaught syntax error: invalid shorthand property initializer

Sometimes when typing JS code, you will often encounter such errors:

This is due to careless typing of code, resulting in grammatical format errors.

If the object literal is used to define the object, the relationship between the attribute name and the attribute value:

<script>
var province = [{
            id: 1002,
            name: 'Heibei',
            city: [{
                    id: 1,
                    name= 'Shijiazhuang' // use object literals to define objects with attribute names separated from attribute values by:.
                },
                {
                    id: 2,
                    name: 'Handan'
                }
            ]
        }];
</script>

Grammar norms are very important. Try not to make mistakes that can be avoided.

Uniapp uses CMD to import uview. An error is reported, and the file search fails: ‘uview UI’‘

Uniapp uses CMD to import uview. An error is reported, and the file search fails: ‘uview UI’

Note: do not use CMD to import uview plug-in. If you use local file import, the problem does not exist and can be imported normally.

1.App.vue

2.main.js

3.pages.json

4.uni.scss

5. Uview is imported into the project root directory

Vue project, browser error: referenceerror: H is not defined

JSX syntax
encounters this error: check whether there are parameters similar to the code structure in the picture in your data() {
}. This belongs to JSX syntax and can also render components directly. However, in some specific scenarios, the browser console will report
referenceerror: H is not defined. This error
solution: create a new method in methods () {} and clip the parameters of the whole structure above to the method. The parameters in the data that you called before the template code block is changed from calling the methods to solving the problem from the method,