Category Archives: Error

[Solved] Android12 Download Error: The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Android12 install reports an error the application could not be installed: install_ PARSE_ FAILED_ MANIFEST_ MALFORMED

Solution:

For apps with Android12 as the adaptation platform, all four components that contain an intent-filter need to declare the android:exported attribute, and if the intent-filter contains LAUNCHER, it is best to declare it as android:exported= “true”

For example:

 <activity android:name=".MainActivity"
           android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
 </activity>

The four main components that use intent-filter can be viewed through the Merged Manifest in the manifest file

If you still get the error Installation failed due to: ‘-127’, try adding the following parameter to the manifest file

<permission-group android:name="${applicationId}.andpermission" />

 

[Solved] VScode powershell Run ts-node Error: Unable to load file xxxx…

vscode powershell running ts-node reports an error

Recurrence : In window10, ts-node is installed globally on the external CMD , and execution of ts-node -v shows that the version number is installed successfully. Open the terminal in vscode , create a new ts file and use ts-node test.ts to report an error.

ts-node : Unable to load file xxxx because running scripts is prohibited on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Location Line: 1 Character: 1

+ ts-node 07.ts

+ ~~~~~~~

    + CategoryInfo : SecurityError: (:)[], PSSecurityException

+ FullyQualifiedErrorId : UnauthorizedAccess

Reason : The script running on cmd cannot run on powershell , and the execution policy of powershell restricts its execution.

Solution : View the execution policy of powershell and change the execution policy for the user

Execute the command to view the execution policy:  Get-ExecutionPolicy -List

Briefly explain:

userPolicy — Computer current user group policy settings

Process —   This scope only affects the current powershell session, the execution policy is not saved in the registry, and it is deleted when it is closed. (Refer to sessionStorage to understand)

CurrentUser — The execution policy affects only the current user, which is stored in the HKEY_CURRENT_USER registry

LocalMachine — Execution policy affects all users on the current computer and is saved in the registry

 

Change the execution policy of CurrentUser

Set-ExecutionPolicy -ExecutionPolicy <PolicyName> -Scope <scope>

Change CurrentUser to RemoteSigned here .

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Review the execution strategy again

 

It’s ok now

[Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory

The compile command I use is as follows:

 gcc  demuxing_decoding.c  -o demuxing_decoding -g -I ./ffmpeg-5.0.1/include -L ./ffmpeg-5.0.1/lib/ \
          -l avcodec -l avutil -l avformat -l swresample  -lm -Wl,-rpath=./ffmpeg-5.0.1/lib/                                    

The directory ./ffmpeg-5.0.1/lib/ clearly has the library libswresample.so.4, but it is suggested that the dynamic library cannot be found.
It is best to have no choice. You can only follow the method commonly used on the Internet: /etc/ld Add the directory where the library libswresample.so.4 is located in .so.conf, and execute the command ldconfig.

[Solved] Spring Nature latex Error: Getting the error “Missing $ inserted” in LaTeX

I have been using the template of IJICAI and NeurIPS before, but when I moved the content to the latex template of spring nature today, there was a format error:

Getting the error “Missing $ inserted” in LaTeX

source:

 

 

recompile:

 

 After inspection, it was found that there was a problem with the representation of the absolute value symbol “|”:

 When using \vert instead of “|” for absolute values:

 

 

recomplie:

 

 This method has been proven to be effective.

[Solved] lightdb oracle_fdw Error: ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle

Error Messages:

create server oradb foreign data wrapper oracle_fdw options (dbserver '//10.20.30.199:1521/test');
create user mapping for USER server oradb options (user 'scott', password 'scott');
GRANT USAGE ON FOREIGN DATA WRAPPER oracle_fdw TO CURRENT_USER;
GRANT USAGE ON FOREIGN SERVER oradb TO CURRENT_USER;

create foreign table haha
( id int)
SERVER oradb OPTIONS (schema 'scott', table 'haha


[lightdb@hs-10-20-30-199 ~]$ ltsql -p 5435 -U scott -d scott
ltsql (13.3-22.2)
Type "help" for help.

scott@scott=# select * from haha;
ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle
DETAIL:
scott@scott=#
scott@scott=#
scott@scott=#
scott@scott=#
scott@scott=#
scott@scott=#
scott@scott=# select * from haha;
ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle
DETAIL:

 

Solution:
Install the oracle light client. The oracle client can be downloaded from https://www.oracle.com/database/technologies/instant-client/downloads.html .
export ORACLE_HOME=/home/lightdb/instantclient_21_6
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
Restart lightdb, the problem is solved.

[Solved] prometheus Exception Exit Error: opening storage failed

The abnormal exit log of Prometheus is as follows:

Solution:

1. Enter the Prometheus data directory, remove the error folder, and the log after restart is as follows:

ts=2022-06-30T03:52:56.187Z caller=manager.go:956 level=info component="rule manager" msg="Rule manager stopped"
ts=2022-06-30T03:52:56.187Z caller=notifier.go:600 level=info component=notifier msg="Stopping notification manager..."
ts=2022-06-30T03:52:56.187Z caller=main.go:1068 level=info msg="Notifier manager stopped"
ts=2022-06-30T03:52:56.187Z caller=main.go:1077 level=error err="opening storage failed: reloadBlocks: 15 errors: corrupted block 01G2XWKD8X0VPKWNJGN5YE64E7: read symbols: invalid checksum; corrupted block 01G3E6EMA9NMC5P3GEASJD7A4H: invalid magic number 0; corrupted block 01G1TFMH0WD2YXH0GJ9D86QKFY: invalid magic number 0; corrupted block 01G22VDVS27547SZ1BRMG8R4JY: invalid magic number 0; corrupted block 01G3VG5NRWAVJ8WGN0PZ2T5TAH: read symbols: invalid checksum; corrupted block 01G548SQ8V8YFVCR5XP3XS6GGW: read symbols: invalid checksum; corrupted block 01G313KA0WPYMK53APAPGGQ3RD: read symbols: invalid checksum; corrupted block 01G361H0RV5HA7ZMJA37GJJ605: invalid magic number 0; corrupted block 01G36P4714CSMRBZJMV5XV2W63: read symbols: invalid checksum; corrupted block 01G3X07RGVREACT0YTJP3HMVH2: read symbols: invalid checksum; corrupted block 01G578XWRW3E0VSY0X35FMMDPD: read symbols: invalid checksum; corrupted block 01G32CSNGWD0SAFSDF2HSXT6J5: read symbols: invalid checksum; corrupted block 01G37AQC8WVV2AWQNZWNF05WYA: read symbols: invalid checksum; corrupted block 01G386698WS46Q9566K0X9VX25: invalid magic number 0; corrupted block 01G4A9YT0WJDKKWEM33B017D0T: read symbols: invalid checksum"

2. Remove all error blocks in the log

$ mv 01G313KA0WPYMK53APAPGGQ3RD 01G361H0RV5HA7ZMJA37GJJ605 01G36P4714CSMRBZJMV5XV2W63 01G3X07RGVREACT0YTJP3HMVH2 01G578XWRW3E0VSY0X35FMMDPD 01G32CSNGWD0SAFSDF2HSXT6J5 01G37AQC8WVV2AWQNZWNF05WYA 01G386698WS46Q9566K0X9VX25 01G4A9YT0WJDKKWEM33B017D0T bak/

3. Start again successfully.

ts=2022-06-30T03:56:12.892Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G313KA0WPYMK53APAPGGQ3RD err="open /data/01G313KA0WPYMK53APAPGGQ3RD/meta.json: no such file or directory"
ts=2022-06-30T03:56:13.355Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G32CSNGWD0SAFSDF2HSXT6J5 err="open /data/01G32CSNGWD0SAFSDF2HSXT6J5/meta.json: no such file or directory"
ts=2022-06-30T03:56:15.150Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G361H0RV5HA7ZMJA37GJJ605 err="open /data/01G361H0RV5HA7ZMJA37GJJ605/meta.json: no such file or directory"
ts=2022-06-30T03:56:15.381Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G36P4714CSMRBZJMV5XV2W63 err="open /data/01G36P4714CSMRBZJMV5XV2W63/meta.json: no such file or directory"
ts=2022-06-30T03:56:15.641Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G37AQC8WVV2AWQNZWNF05WYA err="open /data/01G37AQC8WVV2AWQNZWNF05WYA/meta.json: no such file or directory"
ts=2022-06-30T03:56:16.006Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G386698WS46Q9566K0X9VX25 err="open /data/01G386698WS46Q9566K0X9VX25/meta.json: no such file or directory"
ts=2022-06-30T03:56:26.474Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G3X07RGVREACT0YTJP3HMVH2 err="open /data/01G3X07RGVREACT0YTJP3HMVH2/meta.json: no such file or directory"
ts=2022-06-30T03:56:33.312Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G4A9YT0WJDKKWEM33B017D0T err="open /data/01G4A9YT0WJDKKWEM33B017D0T/meta.json: no such file or directory"
ts=2022-06-30T03:56:46.171Z caller=db.go:1157 level=error component=tsdb msg="Failed to read meta.json for a block during reloadBlocks. Skipping" dir=/data/01G578XWRW3E0VSY0X35FMMDPD err="open /data/01G578XWRW3E0VSY0X35FMMDPD/meta.json: no such file or directory"
ts=2022-06-30T03:57:08.413Z caller=head.go:493 level=info component=tsdb msg="Replaying on-disk memory mappable chunks if any"
ts=2022-06-30T03:57:35.681Z caller=head.go:520 level=error component=tsdb msg="Loading on-disk chunks failed" err="iterate on on-disk chunks: corruption in head chunk file /data/chunks_head/001701: checksum mismatch expected:00000000, actual:cfead048"
ts=2022-06-30T03:57:35.684Z caller=head.go:689 level=info component=tsdb msg="Deleting mmapped chunk files"
ts=2022-06-30T03:57:35.764Z caller=head.go:699 level=info component=tsdb msg="Deletion of mmap chunk files successful, reattempting m-mapping the on-disk chunks"
ts=2022-06-30T03:57:35.869Z caller=head.go:536 level=info component=tsdb msg="On-disk memory mappable chunks replay completed" duration=27.456523956s
ts=2022-06-30T03:57:35.869Z caller=head.go:542 level=info component=tsdb msg="Replaying WAL, this may take a while"
ts=2022-06-30T03:58:34.193Z caller=head.go:578 level=info component=tsdb msg="WAL checkpoint loaded"
ts=2022-06-30T03:58:48.103Z caller=db.go:750 level=warn component=tsdb msg="Encountered WAL read error, attempting repair" err="read records: corruption in segment /data/wal/00003413 at 77221215: snappy: corrupt input"
ts=2022-06-30T03:58:48.103Z caller=wal.go:364 level=warn component=tsdb msg="Starting corruption repair" segment=3413 offset=77221215
ts=2022-06-30T03:58:48.455Z caller=wal.go:372 level=warn component=tsdb msg="Deleting all segments newer than corrupted segment" segment=3413
ts=2022-06-30T03:59:54.766Z caller=wal.go:394 level=warn component=tsdb msg="Rewrite corrupted segment" segment=3413
ts=2022-06-30T04:00:44.492Z caller=main.go:958 level=info fs_type=65735546
ts=2022-06-30T04:00:44.492Z caller=main.go:961 level=info msg="TSDB started"

 

[Solved] unity EditorGUILayer dynamic drawing scrolling list error

The specific error message: ArgumentException: Getting control 0’s position in a group with only 0 controls when doing Repaint A

OnGUI will be called two times each time it draws, the first time to calculate the position of all controls, all EdtorGUILayout control method returns the Rect is 0; the second time to draw all the content based on the position, the control method returns the Rect is the actual coordinates.

BeginScrollView to generate a scrolling list, because I need to display a lot of content, so I made an optimization: pre-calculate the position of each line, when the line is in viewport display content, otherwise display blank.

Generic logging found that the height of each row generated by the system is not the same, generally floating randomly between 19-21, so it is impossible to calculate the position of each row, so instead, when the second call to OnGUI, use the Rect returned by the control method to calculate in real time.

 

How to Solve UW Microcontroller KEIL _WEAK Error

1. The list of problems when __WEAK is not recognized by Keil compilation is as follows.
A screenshot of the problem that sometimes occurs when __WEAK is not recognized when compiling with Keil is as follows.

The error message prompted is as follows:

..\..\..\..\mcu\common\interrupts_hc32l13x.c(72): error:  #77-D: this declaration has no storage class or type specifier
  __WEAK void Uart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(72): error:  #65: expected a ";"
  __WEAK void Uart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(73): error:  #77-D: this declaration has no storage class or type specifier
  __WEAK void LpUart0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(73): error:  #65: expected a ";"
  __WEAK void LpUart0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(74): error:  #77-D: this declaration has no storage class or type specifier
  __WEAK void LpUart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(74): error:  #65: expected a ";"
  __WEAK void LpUart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(75): error:  #77-D: this declaration has no storage class or type specifier
  __WEAK void Spi0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(75): error:  #65: expected a ";"

Solution:
Because it needs to be defined as __weak in Keil to be recognized (non-capitalized _WEAK), add the following lines of definition to the header file base_types.h file, and compile it OK!

#if defined (__ICCARM__)
#define __WEAK            __WEAK __ATTRIBUTES
#elif defined (__CC_ARM)
#define __WEAK            __weak
#else
#error    "unsupported compiler!!"
#endif

2. Cause analysis

ARM series compilation tool chain: __CC_ARM__, __ICCARM__, __GNUC__, __TASKING__
In order to solve the problem reported above, __ICCARM__ and __CC_ARM are defined, and a description is made here.

__CC_ARM corresponds to the platform: ARM RealView.
RealView is a set of development tools including compilation, debugging and simulation, which should be used in combination with development environments such as uvision, eclipse or CodeWarrior to form an integrated development environment.

__ICCARM__ corresponds to the platform: IAR EWARM.
Embedded Workbench for ARM is an integrated development environment developed by IARSystems for ARM microprocessors (hereinafter referred to as IAR EWARM). Compared to other ARM development environments, IAR EWARM is easy to start, easy to use, and compact in code.

The corresponding platform of __GNUC__ is: GNU Compiler Collection:
GCC was originally intended to be a compiler written specifically for the GNU operating system, which is thoroughly free software.

How to Solve dtd Error in MybatisGenerator.xml file

1: when writing mbatisgenerator.xml file, error is reported because the dtd file is not added

2: Add dtd file

1. Click Settings–2. Click Settings–3. Search for cata in the search box
4. Click Schemas and DTDs–5 Click the + sign under External schemas and DTDs
6. Enter in URL ( http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd )

7. Enter the location of the dtd file in File (this is the location of my dtd file—-E:\dtd\mybatis-generator-config_1_0.dtd)

Open browser download without this file (http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd)

 

[Solved] Flutter Error: No MediaQuery widget ancestor found.

Error reporting is shown in figure

Problem code

import 'package:flutter/material.dart';

void main() {
  runApp(SampleAppPage());
}

class SampleAppPage extends StatefulWidget {
  const SampleAppPage({Key?key}) : super(key: key);

  @override
  _SampleAppPageState createState() => _SampleAppPageState();
}

class _SampleAppPageState extends State<SampleAppPage>
    with SingleTickerProviderStateMixin {
  late AnimationController controller;
  late CurvedAnimation curve;

  @override
  void initState() {
    super.initState();
    controller = AnimationController(
      duration: const Duration(milliseconds: 2000),
      vsync: this,
    );
    curve = CurvedAnimation(
      parent: controller,
      curve: Curves.easeIn,
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: GestureDetector(
          child: RotationTransition(
            turns: curve,
            child: const FlutterLogo(size: 200.0),
          ),
          onDoubleTap: () {
            if (controller.isCompleted) {
              controller.reverse();
            } else {
              controller.forward();
            }
          },
        ),
      ),
    );
  }
}

Reason: the root component of the fluent interface must be MaterialApp

Code after repair

import 'package:flutter/material.dart';

void main() {
  runApp(SampleApp());
}

class SampleApp extends StatelessWidget {
  // This widget is the root of your application.
  const SampleApp({Key?key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Sample App',
      home: SampleAppPage(),
    );
  }
}

class SampleAppPage extends StatefulWidget {
  const SampleAppPage({Key?key}) : super(key: key);

  @override
  _SampleAppPageState createState() => _SampleAppPageState();
}

class _SampleAppPageState extends State<SampleAppPage>
    with SingleTickerProviderStateMixin {
  late AnimationController controller;
  late CurvedAnimation curve;

  @override
  void initState() {
    super.initState();
    controller = AnimationController(
      duration: const Duration(milliseconds: 2000),
      vsync: this,
    );
    curve = CurvedAnimation(
      parent: controller,
      curve: Curves.easeIn,
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: GestureDetector(
          child: RotationTransition(
            turns: curve,
            child: const FlutterLogo(size: 200.0),
          ),
          onDoubleTap: () {
            if (controller.isCompleted) {
              controller.reverse();
            } else {
              controller.forward();
            }
          },
        ),
      ),
    );
  }
}