Category Archives: Error

[Solved] STM8L151 IAR Project Compile Error: Fatal Error[Pe035]: #error directive: “Please select first the target STM8L…

Project scenario:

STM8L151G4XX MCU IAR engineering compilation error


Problem description

Fatal Error[Pe035]: #error directive: “Please select first the target STM8L device used in your application (in stm8l15x.h file)”
Open stm8l15x.h, and we can see the following code:

#if !defined (STM8L15X_MD) && !defined (STM8L15X_MDP) && !defined (STM8L15X_HD) && !defined (STM8L15X_LD) \
&& !defined (STM8L05X_LD_VL) && !defined (STM8L05X_MD_VL) && !defined (STM8L05X_HD_VL) && !defined (STM8AL31_L_MD)
 #error "Please select first the target STM8L device used in your application (in stm8l15x.h file)"
#endif
/* Uncomment the line below according to the target STM8L15x device used in your
   application
  */
/* #define STM8L15X_LD */     /*!< STM8L15X_LD: STM8L15x Low density devices */
/* #define STM8L15X_MD */     /*!< STM8L15X_MD: STM8L15x Medium density devices */
/* #define STM8L15X_MDP */    /*!< STM8L15X_MDP: STM8L15x Medium density plus devices */
/* #define STM8L15X_HD */     /*!< STM8L15X_HD: STM8L15x/16x High density devices */
/* #define STM8L05X_LD_VL */  /*!< STM8L05X_LD_VL: STM8L051xx3 Low density value line devices */
/* #define STM8L05X_MD_VL */  /*!< STM8L05X_MD_VL: STM8L052xx6 Medium density value line devices */
/* #define STM8L05X_HD_VL */  /*!< STM8L05X_HD_VL: STM8L052xx8 High density value line devices */
/* #define STM8AL31_L_MD */   /*!< STM8AL31_L_MD: STM8AL3x Medium density devices */


/*  Tip: To avoid modifying this file each time you need to switch between these
        devices, you can define the device in your toolchain compiler preprocessor.

 - Low density STM8L15x devices are STM8L151C3, STM8L151K3, STM8L151G3, STM8L151F3,
   STM8L151C2, STM8L151K2, STM8L151G2 and STM8L151F2 microcontrollers where the 
   Flash memory density ranges between 4 and 8 Kbytes.
 - Medium density STM8L15x devices are STM8L151C4, STM8L151C6, STM8L152C4,
   STM8L152C6, STM8L151K4, STM8L151K6, STM8L152K4, STM8L152K6, STM8L151G4,
   STM8L151G6, STM8L152G4 and STM8L152G6 microcontrollers where the Flash memory
   density ranges between 16 and 32 Kbytes.
 - Medium density Plus devices are STM8L151R6, STM8L152R6 microcontrollers where
  the Flash memory density is fixed and equal to 32 Kbytes and a wider range of
  peripheral than the medium density devices.
 - High density STM8L15x devices are STM8L151x8, STM8L152x8, STM8L162R8 and STM8L162M8
   microcontrollers where the Flash memory density is fixed and equal to 64 Kbytes with 
   the same peripheral set than Medium Density Plus devices.
 - Value line low density STM8L05xx devices are STM8L051x3 microcontrollers
   with 8-KB Flash
 - Value line medium density STM8L05xx devices are STM8L052x6 microcontrollers 
   with 32-KB Flash
 - Value line high density STM8L05xx devices: STM8L052x8 microcontrollers
   with 64-KB Flash
 - Medium density STM8AL31xx/STM8AL3Lxx devices: STM8AL3168, STM8AL3166, 
   STM8AL3148,STM8AL3146, STM8AL3138, STM8AL3136, STM8AL3L68, STM8AL3L66, 
   STM8AL3L48, STM8AL3L46 microcontrollers with 8-KB, 16-KB or 32-KB Flash
 */

Solution:

Method 1:
Modify directly in the stm8l15x.h file, delete the comment symbols of the macro definition needed, take STM8L151G4XX as an example, according to the above description, the model belongs to Medium density.

/* Uncomment the line below according to the target STM8L15x device used in your
   application
  */
/* #define STM8L15X_LD */     /*!< STM8L15X_LD: STM8L15x Low density devices */
 #define STM8L15X_MD   		/*!< STM8L15X_MD: STM8L15x Medium density devices */
/* #define STM8L15X_MDP */    /*!< STM8L15X_MDP: STM8L15x Medium density plus devices */
/* #define STM8L15X_HD */     /*!< STM8L15X_HD: STM8L15x/16x High density devices */
/* #define STM8L05X_LD_VL */  /*!< STM8L05X_LD_VL: STM8L051xx3 Low density value line devices */
/* #define STM8L05X_MD_VL */  /*!< STM8L05X_MD_VL: STM8L052xx6 Medium density value line devices */
/* #define STM8L05X_HD_VL */  /*!< STM8L05X_HD_VL: STM8L052xx8 High density value line devices */
/* #define STM8AL31_L_MD */   /*!< STM8AL31_L_MD: STM8AL3x Medium density devices */

Method 2:
Set the path: Options->C/C++ Compiler->Preprocessor-Defined symbols

Driver error 11: System 0.500000: CAN 1 : Message with ID = 630 could not be sent. Driver error 11 in TransmitCANFrame

System 0.500000: CAN 1 : Message with ID = 630 could not be sent. Driver error 11 in TransmitCANFrame

Driver error 11

1. Select Real Bus mode when Canoe physical device is connected

2. Check the network hardware configuration. If the current can channel is abnormal, click the Driver in the lower right corner to set it

3. Terminal resistance

Check whether the terminal resistance is faulty.

4. Check channel mapping

 

error: src refspec master does not match any [How to Solve]

When you use the git bash command to upload items to github, you always encounter some errors that cannot be resolved.

Here is a problem I encountered

error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:hahaha/ftpmanage.git'

Question content:

Error: SRC ReFSPEC master does not match any
Error: Failed to push some references to ‘git @ Github. com: HaHaa/ftpMal git’

That is, the warehouse is empty.

Solution:

Use git add xxx.py command adds all files, and then use command git commit -m “init” to commit all files,

git commit -m "init"

Then execute

git remote add origin xxxxxxxx.git

Last use

$ git push -u origin master

be accomplished.

Summary:

In fact, only the following steps are needed to upload the local project to Github

 1. create a local repository (i.e. folder) and turn it into a Git repository by git init.

 2. Copy the project into this folder and add it to the repository via git add . Add the project to the repository.

 3. commit the project to the repository by using git commit -m "comment content".

 4, after setting up the SSH key on Github, create a new remote repository by git remote add origin https://github.com/guyibang/TEST2.git Associate a local repository with a remote repository.

 5, and finally push the local repository project to the remote repository (that is, Github) through git push -u origin master; (if the new remote repository automatically created a README file will report an error, the solution see above).

 

[Solved] CDH ipa: ERROR: Host ‘cdh-master-v02.yunes.com‘ does not have corresponding DNS A/AAAA record

1. Error environment

1. System version: CentOS7.7

2. IPA version: 4.6.8

2. Error occurred when installing Kerberos

1. Error description:

Execute global command Generate lost credentials
/opt/cloudera/cm/bin/gen_credentials_ipa.sh failed with exit code 1 and output of <<
+ CMF_REALM=YUNES.COM
+ export PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/usr/lib/mit/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
+ PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/usr/lib/mit/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
+ kinit -k -t /var/run/cloudera-scm-server/cmf8356082187139991822.keytab [email protected]
+ KEYTAB_OUT=/var/run/cloudera-scm-server/cmf1174813005448134353.keytab
+ PRINCIPAL=impala/[email protected]
+ MAX_RENEW_LIFE=432000
+ '[' -z /etc/krb5.conf ']'
+ echo 'Using custom config path '\''/etc/krb5.conf'\'', contents below:'
+ cat /etc/krb5.conf
+ PRINC=impala
++ echo impala/[email protected]
++ cut -d/-f 2
++ cut -d @ -f 1
+ HOST=cdh-master-v02.yunes.com
+ set +e
+ ipa host-find cdh-master-v02.yunes.com
+ ERR=0
+ set -e
+ [[ 0 -eq 0 ]]
+ echo 'Host cdh-master-v02.yunes.com exists'
+ set +e
+ ipa service-find impala/[email protected]
+ ERR=1
+ set -e
+ [[ 1 -eq 0 ]]
+ PRINC_EXISTS=no
+ echo 'Adding new principal: impala/[email protected]'
+ ipa service-add impala/[email protected]
ipa: ERROR: Host 'cdh-master-v02.yunes.com' does not have corresponding DNS A/AAAA record


2, the solution (may be version differences in their own choice of test)
1)

ipa dnsrecord-add yunes.com cdh-cm-v01 –a-rec 192.168.0.200;
ipa dnsrecord-add yunes.com cdh-master-v01 –a-rec 192.168.0.201;
ipa dnsrecord-add yunes.com cdh-master-v02 –a-rec 192.168.0.202;
ipa dnsrecord-add yunes.com cdh-datanode-v01 –a-rec 192.168.0.203;
ipa dnsrecord-add yunes.com cdh-datanode-v02 –a-rec 192.168.0.204;
ipa dnsrecord-add yunes.com cdh-datanode-v03 –a-rec 192.168.0.205;
ipa dnsrecord-add yunes.com cdh-client-v01 –a-rec 192.168.0.206;

[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-cm-v01 --a-rec 192.168.0.200;
ipa dnsrecord-add yunes.com cdh-master-v01 --a-rec 192.168.0.201;
ipa dnsrecord-add yunes.com cdh-master-v02 --a-rec 192.168.0.202;
ipa dnsrecord-add yunes.com cdh-datanode-v01 --a-rec 192.168.0.203;
ipa dnsrecord-add yunes.com cdh-datanode-v02 --a-rec 192.168.0.204;
ipa dnsrecord-add yunes.com cdh-datanode-v03 --a-rec 192.168.0.205;
ipa dnsrecord-add yunes.com cdh-client-v01 --a-rec 192.168.0.206;  Record name: cdh-cm-v01
  A record: 192.168.0.200
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-master-v01 --a-rec 192.168.0.201;
  Record name: cdh-master-v01
  A record: 192.168.0.201
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-master-v02 --a-rec 192.168.0.202;
  Record name: cdh-master-v02
  A record: 192.168.0.202
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-datanode-v01 --a-rec 192.168.0.203;
  Record name: cdh-datanode-v01
  A record: 192.168.0.203
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-datanode-v02 --a-rec 192.168.0.204;
  Record name: cdh-datanode-v02
  A record: 192.168.0.204
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-datanode-v03 --a-rec 192.168.0.205;
  Record name: cdh-datanode-v03
  A record: 192.168.0.205
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# ipa dnsrecord-add yunes.com cdh-client-v01 --a-rec 192.168.0.206;
  Record name: cdh-client-v01
  A record: 192.168.0.206
  SSHFP record: 1 1 2EE47C060AD498FACE720384A62F5672A24F2B15, 1 2 E0F507FC5983919E80A81397167FE5B0A31247E55B9FE96D1F789534 35250808, 3 1
                182B18E515A1A9D4C7B434BA4775876709F6DF2A, 3 2 76C34C382E5060EF30D0545A82D8BC0DB3D18034849CCE3ECB601A37 08F8F36C, 4 1
                67CE1FEB39325B57790BB046035E53A3AF2B893C, 4 2 CBDE7A7845393E7C60713731DE0F18CA7670FDA37A8232E2F53AE401 527D1248
[root@cdh-ipa-v01 ~]# 


2)

ipa dnsrecord-add 0.168.192.in-addr.arpa 200 –ptr-rec cdh-cm-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 201 –ptr-rec cdh-master-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 202 –ptr-rec cdh-master-v02.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 203 –ptr-rec cdh-datanode-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 204 –ptr-rec cdh-datanode-v02.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 205 –ptr-rec cdh-datanode-v03.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 206 –ptr-rec cdh-client-v01.yunes.com.

ipa dnsrecord-add 0.168.192.in-addr.arpa 200 --ptr-rec cdh-cm-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 201 --ptr-rec cdh-master-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 202 --ptr-rec cdh-master-v02.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 203 --ptr-rec cdh-datanode-v01.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 204 --ptr-rec cdh-datanode-v02.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 205 --ptr-rec cdh-datanode-v03.yunes.com.
ipa dnsrecord-add 0.168.192.in-addr.arpa 206 --ptr-rec cdh-client-v01.yunes.com.

 

[Solved] EDKII Add Comments or Debug Error: UEFI EDKII error: C2220

Error Messages:

UEFI EDKII error: C2220

Reason: Look at the figure should be coding problems, combined with other languages encountered in the development process of coding problems caused by comment mess, consider this direction to solve.

Solution:

Because the framework of EDKII is different from others, it is not easy to open it with an IDE or set something to modify the encoding format, so we decided to set the decoding method of the window system

Check the Beta version in the control panel and use UTF-8 encoding.

Cannot start container 39f96c64a9c6: [8] System error: exec format error

An error occurred when Docker started the container!

Error response from daemon: Cannot start container 39f96c64a9c6: [8] System error: exec format error
FATA[0000] Error: failed to start one or more containers

Cause: Running a 64 bit Docker image on a 32-bit system

To view the system version:

  • uname -a
  • lsb_release -a


Solution:

Install and use docker in Ubuntu 14.04 (32-bit)


New Error as below:

FATA[0000] Post http:///var/run/docker.sock/v1.18/images/create?fromSrc=ubuntu%3A14.04&repo=: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?

Solution: Switch to root administrator status to solve the problem!

SRS5.0 Error: srt serve error code=6006 [How to Solve]

Using SRS 5.0, with SRT push flow configured, an error is reported after starting the configuration file:

 srt serve error code=6006 : srt disabled,

My configuration:

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
srt_server {
enabled on;
listen 10080;
maxbw 1000000000;
connect_timeout 4000;
latency 20;
peerlatency 20;
recvlatency 20;
}

解决:添加上以下

Solution: Add the following code

vhost __defaultVhost__ {
    srt {
        enabled     on;
        srt_to_rtmp on;
    }
}

So far, the problem has been solved.

My srs is deployed on ubuntu and push and pull streams are on different computers. Pushflow and ubuntu are on one public network. The pull stream is on another public network. The time delays are as follows.

1. push streaming is using core image

2, pulling stream is using ffplay

3, remote control of the pulling computer on the pushing computer, cut the comparison chart.

Room DB Error: AppDatabase_Impl does not exist [How to Solve]

Kotlin tests the use of Android Room, and when calling Room.databaseBuilder in coroutine, it reports an error:

AppDatabase_Impl does not exist

After checking the developer documentation, you can configure it according to the documentation. After thinking deeply, you find that there is a problem with the developer documentation

dependencies {
    val room_version = "2.4.3"

    implementation("androidx.room:room-runtime:$room_version")
    annotationProcessor("androidx.room:room-compiler:$room_version")

    // To use Kotlin annotation processing tool (kapt)
    kapt("androidx.room:room-compiler:$room_version")
    // To use Kotlin Symbol Processing (KSP)
    ksp("androidx.room:room-compiler:$room_version")

    // optional - Kotlin Extensions and Coroutines support for Room
    implementation("androidx.room:room-ktx:$room_version")

    // optional - RxJava2 support for Room
    implementation("androidx.room:room-rxjava2:$room_version")

    // optional - RxJava3 support for Room
    implementation("androidx.room:room-rxjava3:$room_version")

    // optional - Guava support for Room, including Optional and ListenableFuture
    implementation("androidx.room:room-guava:$room_version")

    // optional - Test helpers
    testImplementation("androidx.room:room-testing:$room_version")

    // optional - Paging 3 Integration
    implementation("androidx.room:room-paging:2.5.0-alpha03")
}

The above developer documents give, but when adding dependencies, one dependency is:

 kapt("androidx.room:room-compiler:$room_version")

So the problem lies here. There is a dependency of Kapt, but there is no plugin of Kapt

The final solution:

Modify the configuration of app gradle.build to add the plugin kotlin-kapt, as follows:

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
}

Then confirm the three dependency dependencies related to room:

  implementation("androidx.room:room-runtime:2.4.3")
    annotationProcessor("androidx.room:room-compiler:2.4.3")
    kapt("androidx.room:room-compiler:2.4.3")

_LSOpenURLsWithCompletionHandler() failed for the application xxx with error -10671 [Solved]

Problem description

After updating the macos system and turning off SIP in mbp version 2022, the applications on the ipad installed on the system do not start properly and the following error is reported when running the open command in the terminal:

longyudeMacBookPro:~ longyu$ open -a "xxx"
_LSOpenURLsWithCompletionHandler() failed for the application /Applications/xxx.app with error -10671.
longyudeMacBookPro:~ longyu$

Note: The program name is for example only.

Equipment model and version information

mbp 2022

mac version: macOs Monterey version 12.6

 

Resolution process

  1. Checked app permissions – no exception found
  2. Tried to change application permissions – still can’t start after changing
  3. Check if there is already a process running – open activity monitor, no relevant process found
  4. Think about the items that the system modifies when it works and when it does not work
  5. Suspect a relationship with the SIP configuration.

 

Solution:

When the computer is shut down, long press the shutdown key to enter the recovery mode, open the terminal, execute csrutil enable to enable SIP, and restart the system. After re-entering the system, the program starts normally.

 

Other problems:

I searched the web for the return value of _LSOpenURLsWithCompletionHandler and did not find the meaning of the -10671 return value. The original intention of closing SIP was to use dtrace, a long-known program, normally, but since it has such a side effect after closing it can only be opened temporarily for fun, not all the time.

[ERROR Swap]: running with swap on is not supported. Please disable swap

Failed to install kubeadm, report the following error as below:

[root@k8s1 yum.repos.d]# kubeadm init   –apiserver-advertise-address=192.168.12.10   –image-repository registry.aliyuncs.com/google_containers   –kubernetes-version v1.18.0   –service-cidr=10.96.0.0/12   –pod-network-cidr=10.244.0.0/16
W0928 15:17:23.161858    1999 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.18.0
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Swap]: running with swap on is not supported. Please disable swap
[preflight] If you know what you are doing, you can make a check non-fatal with `–ignore-preflight-errors=…`
To see the stack trace of this error execute with –v=5 or higher

How to Solve:

Need to turn off swap in linux

# Turn off swap, run both commands to solve the problem
swapoff -a # temporary
sed -ri ‘s/. *swap.*/#&/’ /etc/fstab # permanent

 

Execution failed for task ‘:app:processDebugMainManifest‘.> Manifest merger failed : Apps targeting

If the following error occurs:

Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

This following method can solve the problems above:

Add the following codes in app->manifests->AndroidManifest.xml:
android:exported="true"


Source:
java – Android Studio error: “Manifest merger failed: Apps targeting Android 12” – Stack Overflow

APK Install Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

When using the AS autorun, the test APK: app-debug.apk will be automatically generated under the app\build\outputs\apk\debug folder.

Use the command adb install app-debug.apk reports an error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

Solution:

1. Add the -t parameter: Enter the command adb install -t app-debug.apk

2. In the gradle.properties (project root or gradle global configuration directory ~/.gradle/) file add

android.injected.testOnly=false
Causes.

Android Studio 3.0 will automatically add the android:testOnly=”true” property to the application tag of the debug apk’s manifest file