Tag Archives: framework

JNI ERROR global reference table overflow [How to Solve]

Analyze the existing logs and see from the crash dump logs that the error is reported by the systemui module, the specific error logs are as follows:

Cmdline: com.android.systemui

pid: 3329, tid: 3329, name: ndroid.systemui >>> com.android.systemui <<<

The summary in the log shows that the BinderDeathTracker of the BinderCacheManager was referenced 50133 times, and some of the other references combined exceeded the 51200 limit.


50113 of android.telephony.BinderCacheManager$BinderDeathTracker (50113 unique instances)

adb log has a log printed frequently and found the isVowifiAvailable() method in MobileSignalController.java under the systemui module.

39645766 20.08.2022 23:15:03.992 Main   3329  3446  LogcatInfo     NetworkController.MobileSignalController(1) isVowifiAvailable,mVoWiFiSettingEnabled = falsemMMtelVowifi = false

In the isVowifiAvailable() method, the BinderCacheManager is retrieved and the getBinder() method is called. getBinder() then initializes the BinderDeathTracker. isVowifiAvailable() method in MobileSignalController will be called frequently, causing the reference to BinderDeathTracker to slowly exceed the limit.

Before Modified:

try {

    final ImsMmTelManager imsMmTelManager =


    // From CarrierConfig Settings

    mVoWiFiSettingEnabled = imsMmTelManager.isVoWiFiSettingEnabled();

} catch (IllegalArgumentException exception) {

    Log.w(mTag, "fail to get Wfc settings. subId=" + activeDataSubId, exception);





ImsMmTelManager imsMmTelManager;

try {

    imsMmTelManager =


    // From CarrierConfig Settings

    mVoWiFiSettingEnabled = imsMmTelManager.isVoWiFiSettingEnabled();

} catch (IllegalArgumentException exception) {

    Log.w(mTag, "fail to get Wfc settings. subId=" + activeDataSubId, exception);

} finaly {

    imsMmTelManager = null;


Solution: Because this is a local variable, set it to a null value in time after use, and no longer reference the ImsMmTelManager.

Experience: You can view some repeated logs in the adb log, and check whether the code near the log directly or indirectly calls the classes or methods displayed in the Summary.

log4j:WARN Error during default initialization [How to Solve]

Error generation environment

Generated when mybatis sets log4j log

Error description

log4j:ERROR Category option " 1 " not a decimal integer.
java.lang.NumberFormatException: For input string: " 1 "

Error reason

In the log4j.properties file, there are more spaces in the log4j.appender.console.layout.conversionpattern attribute


Before modification:

log4j.appender.console.layout.ConversionPattern =  %d{ABSOLUTE} %5p %c{ 1 }:%L - %m%n

After modification:

log4j.appender.console.layout.ConversionPattern =  %d{ABSOLUTE} %5p %c{1}:%L - %m%n

Xcode12.5 package framework error [How to Solve]

1. General

Today, Xcode was upgraded to 12.5.1. When compiling the existing project, the problem of swift incompatibility reported by referring to the framework compiled by swift appeared again. According to previous experience, just pack it again with the latest version of Xcode, but my colleague recommended a configuration to avoid the problem of swift incompatibility in the later stage, but this configuration was set, But it triggered a series of changes.

2. Project configuration and script modification

2.1. Modify the build libraries for distribution configuration item

This upgrade will ‘build settings’ – & gt` Build Options`->` Build libraries for distribution ` is set to yes, which has solved the problem of incompatibility in the later stage (it is set temporarily and needs to be verified in the later stage).

two point two   Modify project build system

Because ‘build libraries for distribution’ is set to yes, ‘project settings’ – & gt; under’ file ‘in the Project menu` Build system needs to be changed from ‘legacy build system’ to ‘new build system (default)’. Otherwise, packaging will fail with the following error.

  two point three   Modify the universal aggregate script file

Our project uses a universalaggregate script file to execute the other two script files. One is xxxxkitaggregate of IOS_ IOS, one is xxxxkitaggregate of tvos_ tvOS。 In the universalaggregate script, add ` – usemodernbuildsystem = no ‘after the two instructions respectively. If it is set to no, it means that the build system adopts’ legacy build system’, and if it is set to yes, it adopts’ new build system (default) ‘. As follows:

xcodebuild -target "XXXXKitAggregate_iOS" BUILD_DIR="${BUILD_DIR}" -UseModernBuildSystem=NO
xcodebuild -target "XXXXKitAggregate_tvOS" BUILD_DIR="${BUILD_DIR}" -UseModernBuildSystem=NO

Add ` – usemodernbuildsystem = no ‘to avoid disk read-write errors caused by simultaneous packaging of IOS and tvos
the error is as follows:

--error: error: accessing build database "xxx/build/XCBuildData/build.db": disk I/O error


accessing build database "/Users/xxxx/Work/Git/NLDFramework/XXXToolKit/build/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.

2.4 modify the packaging script (xxxxkitaggregate_ios, xxxxkitaggregate_tvos)

Add ‘RM – RF ${build_dir}’ before the ‘xcodebuild – target “XXXX’ command, and remove ‘clean’ from the ‘xcodebuild’ command, as shown in the following figure:

Before each build, delete the build file directory to avoid the following errors:

Could not delete `/Users/xxxx/Work/Git/NLDFramework/XXXMenuKit/build` because it was not created by the build system.

2.5 modify the configuration in Jenkins project

If the framework is packaged through Jenkins, you need to find the build configuration under the corresponding project configuration in Jenkins and check ‘allow failing build results’. Otherwise, Jenkins packaging will fail due to disk read-write exceptions. Check it, that is, ignore the exceptions and put the packaged framework in the specified location.

If not checked, Jenkins’s final output results are as follows:

When checked, Jenkins’s final output results are as follows:

Solution — windows 2012 installation Framework 3.5 in VMWare

Solution – Windows 2012 installation Framework 3.5 in VMWare

Mount the system image
, open the server manager, click “add roles or functions”
do not need to operate here, directly next
check Framework 3.5 here, and then next
click specify alternate source path option
A289885427 here you need to fill in the alternate source path
open the mounted system image, enter the specified location, copy the path
fill in the alternate source path, confirm, and then click Install
to start the installation, wait for the installation to complete
to finish the installation, and then close VMware.

[solution] LD: warning: directory not found for option

In the process of IOS development, this problem is easy to be confused. Let’s have a break today.

Problems and Solutions

In short, there are two aspects to this problem.

The error is as follows, which means that it is an exception when querying Library .

"directory not found for option '-L/..."


Project – & gt; targets – & gt; build setting – & gt; library search paths

Delete the path inside

The error is as follows, which means that it is an exception when querying framework .

"directory not found for option '-F/..."


Project – & gt; targets – & gt; build setting – & gt; framework search paths

Delete the path inside

OK, it’s done.

The above problems have been solved. If you want to know more, you can continue to look down.


Briefly speaking, library search paths and framework search paths .

Framework Search Paths

The explanation that can be found in official documents is as follows:

Locating Frameworks in Non-Standard Directories

If your project links to frameworks that are not included in any of the standard locations, you must explicitly specify the location of that framework before Xcode can locate its header files. To specify the location of such a framework, add the directory containing the framework to the “Framework Search Paths” option of your Xcode project. Xcode passes this list of directories to the compiler and linker, which both use the list to search for the framework resources.

Note: The standard locations for frameworks are the /System/Library/Frameworks directory and the /Library/Frameworks directory on the local system.

If the frameworks you refer to are not in standard locations, you need to set “framework search paths” in the configuration file of the project to specify search paths for compilers and linkers.

Library Search Paths

As for “library search paths”, there is no decent official document, but the content should be similar, but one is used to search framework , and the other is used to search Library .

Although it is said that, what is library and what is framework are still very vague.

However, we found some blogs to illustrate this problem, which are quoted below.


Search paths settings in IOS development

In the development of IOS, we often encounter some path settings, such as the introduction of Baidu map SDK, copying projects to other computers, or reporting the error of library not found when multiple people develop at the same time, or introducing a third-party library, such as asihttprequest / retableview often reporting ? Include & lt; & gt; error, so we need to configure some search paths.

Framework/Library Search Paths

1、Framework Search Paths

The search path of the framework (. Framework bundles ) attached to the project is not widely used in IOS development. Generally, the framework built in the system is used for IOS development.

2、Library Search Paths

Xcode will automatically set the search path of the. A file to be dragged to the third-party library (. A files ) in the project. In order to facilitate transplantation or multi person collaborative development, it will usually be manually set.

For example, we will set the SDK of Baidu map as follows:

$(SRCROOT)/../libs/Release$(EFFECTIVE_ PLATFORM_ Name) , where $(srcroot) macro represents your project file directory, $(effective) _ PLATFORM_ Name) macro represents whether the current configuration is OS or simulator

Header Search Path

1. C / C + + header file reference

In C / C + +, include is a mutation instruction. When compiling, the compiler will replace the relative path with the absolute path. Therefore, the absolute path of the header file is equal to the search path + relative path.

(1) ? Include & lt; iostream. H & gt; : refers to the header file under the compiler’s class library path

(2) ? Include "hello. H" : the header file that refers to the relative path of the project directory

2、(User) Header Search Path

(1) header search path refers to the search path of the header file.

(2) User header search paths refers to the search path of user-defined header files

3、Always Search User Paths

If always search user paths is set to Yes , the compiler will first search the path configured by User header search paths . In this case, ? Include & lt; string. H & gt; , User header search paths the files under the search directory will cover the header files of the system.

reference material

    search paths settings in IOS development, IOS: clarify different search paths, IOS developer Library – including frameworks