Delphi develops a general development process for handheld (android) printers (by analogy)

  

Table of contents

1. Scenario description

2. The SDK file that the manufacturer should provide

3. Operation steps:

1. Export the interface files that Delphi needs and can use:

2. Create an FMX Delphi project and import the interface file (V510.Interfaces.pas) generated in the previous step:

3. Add the jarsdk.jar package to libs:

 4. Call in Delphi:

4. Complete source code download

V. Summary:


1. Scenario description

        Delphi's FMX supports the development of android programs. If you only develop general android programs, it is very simple to use delphi, and the official demo is also very rich. But sometimes we need to develop some special programs for the handheld, and the handheld is an Android system. For example, I have developed TPS900 of Telpo, QS5501 of Group Lock, V510 of Jintaiyi and so on. These handhelds have an integrated thermal printer (58mm). Our program needs to use the printing function, which requires calling the printing function provided by the manufacturer. It is a pity that the printing function is not a standard function of android, so the functions provided by each manufacturer are different, and each manufacturer must be adapted and debugged separately. In addition, like TPS900, QS5501, etc. are also integrated with ID card readers, and also support ID card reading function. This is not a standard function of android, and each manufacturer needs to adapt and debug it separately.

        This article introduces how to adapt the V510 for Jintaiyi and introduces in detail the development process of Delphi adapting non-standard Android functions, using the printing function as an example. For other non-android standard functions, the operation method is the same.

2. The SDK file that the manufacturer should provide

For the printing function, the manufacturer should provide the following documents:

serial number document illustrate
1 .jar package This is a key file, the java package file that Delphi can call (use), including all functions that use the printing function.
2 Demo program Demo printing program of java code, source program and APK. The corresponding APK program has been installed on the handset.
3 Print function (function) instructions It is the instructions for calling the jar printing function

For example, what kind of files are provided by Jin Taiyi's V510, for your convenience, I provide the download link:

serial number document illustrate
1 jarsdk.jar jar package file
2 newprintdemo.zip Demo program called by java
3

Print SDK Guide.pdf

Jin Taiyi OS API Programming Manual_2023_05_09.pdf

It is the instructions for calling the jar printing function

3. Operation steps:

1. Export the interface files that Delphi needs and can use:

Use the java2OP.exe         officially provided by delphi to export the interface file required by Delphi through jarsdk.jar, that is, export the java class into an interface file that can be called by delphi.

        If it is Delphi 11.3, the corresponding java2OP.exe is located at:

        C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\converters\java2op

Through  the java2OP.exe program, the jar package developed by java can be converted into the .pas interface file used by Delphi. java2OP.exe is a console program that supports command line parameters.

- Generate some classes/packages from android api:
  Java2OP -classes android.net.ConnectivityManager android.speech.*

- Generate all classes from mylib.jar
  Java2OP -jar mylib.jar

- Generate some class from mylib.jar
  Java2OP -jar mylib.jar -classes com.mypackage.ClassName

- Generate all classes from java source code, to specified unit
  Java2OP -source myproject/src -unit Androidapi.JNI.CustomName

- Generate all classes from java source code to specified unit
  Java2OP -source myproject/src -unit Androidapi.JNI.CustomName
serial number parameter illustrate
1 -jar The .jar file that needs to be exported
2 -classes The name of the package to be exported
3 -source Java source files that need to be exported (generally not used)
4 -unit Generated Delphi file and package name

For our V510, the command is as follows:

C:\Temp\java2pas>java2OP -jar jarsdk.jar -unit V510.Interfaces -classes ktp.demo.mylibrary.api

Notice:

         The package name of ktp.demo.mylibrary.api is informed by the manufacturer. If the manufacturer does not inform, then only all interfaces can be exported. At this time, there is no need to provide the -classes parameter, so that all java classes and objects will be exported. If the exported .pas file fails to compile, you need to adjust it yourself. Generally speaking, it is okay to export specific packages. If there is a problem with all the exports, you can find the name of the package we actually need to export through the exported file, and then directly export only the specific package again.

After the above command is executed successfully, the content of the exported file (V510.Interfaces.pas) is as follows:

unit V510.Interfaces;

interface

uses
  Androidapi.JNIBridge,
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.Os;

type
// ===== Forward declarations =====

  JBarcodeFormat = interface;//com.google.zxing.BarcodeFormat
  JPaperType = interface;//ktp.demo.mylibrary.PaperType
  JPrintErrorType = interface;//ktp.demo.mylibrary.PrintErrorType
  JPrintItemObj = interface;//ktp.demo.mylibrary.PrintItemObj
  JPrintItemObj_ALIGN = interface;//ktp.demo.mylibrary.PrintItemObj$ALIGN
  Jmylibrary_PrintManager = interface;//ktp.demo.mylibrary.PrintManager
  JPrintManager_PrintCallback = interface;//ktp.demo.mylibrary.PrintManager$PrintCallback
  Jmylibrary_api = interface;//ktp.demo.mylibrary.api

// ===== Interface declarations =====

  JBarcodeFormatClass = interface(JEnumClass)
    ['{78718E02-033C-44B2-A9EF-D001EFA8A366}']
    {class} function _GetAZTEC: JBarcodeFormat; cdecl;
    {class} function _GetCODABAR: JBarcodeFormat; cdecl;
    {class} function _GetCODE_128: JBarcodeFormat; cdecl;
    {class} function _GetCODE_39: JBarcodeFormat; cdecl;
    {class} function _GetCODE_93: JBarcodeFormat; cdecl;
    {class} function _GetDATA_MATRIX: JBarcodeFormat; cdecl;
    {class} function _GetEAN_13: JBarcodeFormat; cdecl;
    {class} function _GetEAN_8: JBarcodeFormat; cdecl;
    {class} function _GetITF: JBarcodeFormat; cdecl;
    {class} function _GetMAXICODE: JBarcodeFormat; cdecl;
    {class} function _GetPDF_417: JBarcodeFormat; cdecl;
    {class} function _GetQR_CODE: JBarcodeFormat; cdecl;
    {class} function _GetRSS_14: JBarcodeFormat; cdecl;
    {class} function _GetRSS_EXPANDED: JBarcodeFormat; cdecl;
    {class} function _GetUPC_A: JBarcodeFormat; cdecl;
    {class} function _GetUPC_E: JBarcodeFormat; cdecl;
    {class} function _GetUPC_EAN_EXTENSION: JBarcodeFormat; cdecl;
    {class} function valueOf(string_: JString): JBarcodeFormat; cdecl;
    {class} function values: TJavaObjectArray<JBarcodeFormat>; cdecl;
    {class} property AZTEC: JBarcodeFormat read _GetAZTEC;
    {class} property CODABAR: JBarcodeFormat read _GetCODABAR;
    {class} property CODE_128: JBarcodeFormat read _GetCODE_128;
    {class} property CODE_39: JBarcodeFormat read _GetCODE_39;
    {class} property CODE_93: JBarcodeFormat read _GetCODE_93;
    {class} property DATA_MATRIX: JBarcodeFormat read _GetDATA_MATRIX;
    {class} property EAN_13: JBarcodeFormat read _GetEAN_13;
    {class} property EAN_8: JBarcodeFormat read _GetEAN_8;
    {class} property ITF: JBarcodeFormat read _GetITF;
    {class} property MAXICODE: JBarcodeFormat read _GetMAXICODE;
    {class} property PDF_417: JBarcodeFormat read _GetPDF_417;
    {class} property QR_CODE: JBarcodeFormat read _GetQR_CODE;
    {class} property RSS_14: JBarcodeFormat read _GetRSS_14;
    {class} property RSS_EXPANDED: JBarcodeFormat read _GetRSS_EXPANDED;
    {class} property UPC_A: JBarcodeFormat read _GetUPC_A;
    {class} property UPC_E: JBarcodeFormat read _GetUPC_E;
    {class} property UPC_EAN_EXTENSION: JBarcodeFormat read _GetUPC_EAN_EXTENSION;
  end;

  [JavaSignature('com/google/zxing/BarcodeFormat')]
  JBarcodeFormat = interface(JEnum)
    ['{295EEC59-8B4F-4030-9659-F1C1D60A5B44}']
  end;
  TJBarcodeFormat = class(TJavaGenericImport<JBarcodeFormatClass, JBarcodeFormat>) end;

  JPaperTypeClass = interface(JEnumClass)
    ['{A277D0EB-DDC7-4426-A169-59550541C3D2}']
    {class} function _GetLABEL: JPaperType; cdecl;
    {class} function _GetTHERMAL: JPaperType; cdecl;
    {class} function valueOf(string_: JString): JPaperType; cdecl;
    {class} function values: TJavaObjectArray<JPaperType>; cdecl;
    {class} property &LABEL: JPaperType read _GetLABEL;
    {class} property THERMAL: JPaperType read _GetTHERMAL;
  end;

  [JavaSignature('ktp/demo/mylibrary/PaperType')]
  JPaperType = interface(JEnum)
    ['{978D7B0C-0F25-41E7-80F6-293F68512E37}']
    function getValue: Integer; cdecl;
  end;
  TJPaperType = class(TJavaGenericImport<JPaperTypeClass, JPaperType>) end;

  JPrintErrorTypeClass = interface(JEnumClass)
    ['{E632FB4B-F40C-49C4-BF62-C87248052CA7}']
    {class} function _GetOUT_OF_PAPER: JPrintErrorType; cdecl;
    {class} function _GetOVERHEATED: JPrintErrorType; cdecl;
    {class} function valueOf(string_: JString): JPrintErrorType; cdecl;
    {class} function values: TJavaObjectArray<JPrintErrorType>; cdecl;
    {class} property OUT_OF_PAPER: JPrintErrorType read _GetOUT_OF_PAPER;
    {class} property OVERHEATED: JPrintErrorType read _GetOVERHEATED;
  end;

  [JavaSignature('ktp/demo/mylibrary/PrintErrorType')]
  JPrintErrorType = interface(JEnum)
    ['{F0520F8F-B774-4941-A0FE-1AB567E23ACE}']
    function getValue: Integer; cdecl;
  end;
  TJPrintErrorType = class(TJavaGenericImport<JPrintErrorTypeClass, JPrintErrorType>) end;

  JPrintItemObjClass = interface(JParcelableClass)
    ['{C3A9B0BA-170D-4E89-BB8B-3961B2A0730A}']
    {class} function _GetCREATOR: JParcelable_Creator; cdecl;
    {class} function init(parcel: JParcel): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN; b1: Boolean): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN; b1: Boolean; b2: Boolean): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN; b1: Boolean; b2: Boolean; i1: Integer): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN; b1: Boolean; b2: Boolean; i1: Integer; i2: Integer): JPrintItemObj; cdecl; overload;
    {class} function init(string_: JString; i: Integer; b: Boolean; aLIGN: JPrintItemObj_ALIGN; b1: Boolean; b2: Boolean; i1: Integer; i2: Integer; i3: Integer; i4: Integer): JPrintItemObj; cdecl; overload;
    {class} property CREATOR: JParcelable_Creator read _GetCREATOR;
  end;

  [JavaSignature('ktp/demo/mylibrary/PrintItemObj')]
  JPrintItemObj = interface(JParcelable)
    ['{FBEE3808-C71D-44CC-8950-A59EE0E60FC9}']
    function _Getalign: JPrintItemObj_ALIGN; cdecl;
    function describeContents: Integer; cdecl;
    function getAlign: JPrintItemObj_ALIGN; cdecl;
    function getFontSize: Integer; cdecl;
    function getGrayscale: Integer; cdecl;
    function getLetterSpacing: Integer; cdecl;
    function getLineHeight: Integer; cdecl;
    function getMarginLeft: Integer; cdecl;
    function getText: JString; cdecl;
    function isBold: Boolean; cdecl;
    function isUnderline: Boolean; cdecl;
    function isWordWrap: Boolean; cdecl;
    procedure setAlign(aLIGN: JPrintItemObj_ALIGN); cdecl;
    procedure setBold(b: Boolean); cdecl;
    procedure setFontSize(i: Integer); cdecl;
    procedure setGrayscale(i: Integer); cdecl;
    procedure setLetterSpacing(i: Integer); cdecl;
    procedure setLineHeight(i: Integer); cdecl;
    procedure setMarginLeft(i: Integer); cdecl;
    procedure setText(string_: JString); cdecl;
    procedure setUnderline(b: Boolean); cdecl;
    procedure setWordWrap(b: Boolean); cdecl;
    procedure writeToParcel(parcel: JParcel; i: Integer); cdecl;
    property align: JPrintItemObj_ALIGN read _Getalign;
  end;
  TJPrintItemObj = class(TJavaGenericImport<JPrintItemObjClass, JPrintItemObj>) end;

  JPrintItemObj_ALIGNClass = interface(JEnumClass)
    ['{6147BA1C-2579-4AF8-9734-2F4CAE057058}']
    {class} function _GetCENTER: JPrintItemObj_ALIGN; cdecl;
    {class} function _GetLEFT: JPrintItemObj_ALIGN; cdecl;
    {class} function _GetRIGHT: JPrintItemObj_ALIGN; cdecl;
    {class} function valueOf(string_: JString): JPrintItemObj_ALIGN; cdecl;
    {class} function values: TJavaObjectArray<JPrintItemObj_ALIGN>; cdecl;
    {class} property CENTER: JPrintItemObj_ALIGN read _GetCENTER;
    {class} property LEFT: JPrintItemObj_ALIGN read _GetLEFT;
    {class} property RIGHT: JPrintItemObj_ALIGN read _GetRIGHT;
  end;

  [JavaSignature('ktp/demo/mylibrary/PrintItemObj$ALIGN')]
  JPrintItemObj_ALIGN = interface(JEnum)
    ['{D680D77D-BC9C-4325-BEBC-514EFFB84DD9}']
  end;
  TJPrintItemObj_ALIGN = class(TJavaGenericImport<JPrintItemObj_ALIGNClass, JPrintItemObj_ALIGN>) end;

  Jmylibrary_PrintManagerClass = interface(JObjectClass)
    ['{1144647F-3D81-4271-9289-867BD8E6577A}']
    {class} function init: Jmylibrary_PrintManager; cdecl; overload;
    {class} function init(handler: JHandler; context: JContext): Jmylibrary_PrintManager; cdecl; overload;
    {class} function init(handler: JHandler; context: JContext; i: Integer): Jmylibrary_PrintManager; cdecl; overload;//Deprecated
  end;

  [JavaSignature('ktp/demo/mylibrary/PrintManager')]
  Jmylibrary_PrintManager = interface(JObject)
    ['{EBBC0620-4EC9-431D-88CA-257B12EAEDEA}']
    procedure addPrintTask(runnable: JRunnable); cdecl;
    procedure print(printItemObj: JPrintItemObj; bitmap: JBitmap); cdecl; overload;
    procedure print(bitmap: JBitmap; paperType: JPaperType); cdecl; overload;
    procedure setPrinterGray(i: Integer); cdecl;
    procedure stop; cdecl;
  end;
  TJmylibrary_PrintManager = class(TJavaGenericImport<Jmylibrary_PrintManagerClass, Jmylibrary_PrintManager>) end;

  JPrintManager_PrintCallbackClass = interface(IJavaClass)
    ['{5C7AE6B2-217B-43D0-B5F8-D3FC8A4373D8}']
    {class} procedure onPrintStart; cdecl;//Deprecated
  end;

  [JavaSignature('ktp/demo/mylibrary/PrintManager$PrintCallback')]
  JPrintManager_PrintCallback = interface(IJavaInstance)
    ['{BABF6796-9708-4DA2-89E0-8956E31EE4FA}']
    procedure onPrintError(printErrorType: JPrintErrorType); cdecl;
    procedure onPrintFinish; cdecl;
  end;
  TJPrintManager_PrintCallback = class(TJavaGenericImport<JPrintManager_PrintCallbackClass, JPrintManager_PrintCallback>) end;

  Jmylibrary_apiClass = interface(JObjectClass)
    ['{D4F76228-7CBE-4989-99AA-A4FC39CB31BD}']
    {class} function getInstance(context: JContext; handler: JHandler): Jmylibrary_api; cdecl;
  end;

  [JavaSignature('ktp/demo/mylibrary/api')]
  Jmylibrary_api = interface(JObject)
    ['{EF208218-7A25-45ED-AEFF-A265FAC646E1}']
    function PrinInt: Byte; cdecl;
    procedure PrnAttrSet(i: Integer); cdecl;
    procedure PrnDoubleHeight(i: Integer; i1: Integer); cdecl;
    procedure PrnDoubleWidth(i: Integer; i1: Integer); cdecl;
    procedure PrnFontSet(b: Byte; b1: Byte); cdecl;
    procedure PrnGetDotLine; cdecl;
    procedure PrnGetFontDot(i: Integer; string_: JString; b: TJavaArray<Byte>); cdecl;
    function PrnGetTemperature: Integer; cdecl;
    procedure PrnLeftIndent(s: SmallInt); cdecl;
    procedure PrnSetFontFile(string_: JString); cdecl;
    procedure PrnSetGray(i: Integer); cdecl;
    procedure PrnSpaceSet(b: Byte; b1: Byte); cdecl;
    procedure PrnSpeStr(string_: JString; i: Integer; b: Boolean; b1: Boolean; i1: Integer); cdecl;
    procedure PrnStart; cdecl;
    function PrnStatus: Byte; cdecl;
    procedure PrnStep(s: SmallInt); cdecl;
    procedure PrnStr(string_: JString); cdecl;
    procedure SdkMoveLabelStep; cdecl;
    procedure prnBitmap(bitmap: JBitmap); cdecl;
    procedure sdkPrintBarCode(i: Integer; i1: Integer; barcodeFormat: JBarcodeFormat; string_: JString; printCallback: JPrintManager_PrintCallback); cdecl;
    procedure sdkPrintPic(bitmap: JBitmap; i: Integer; i1: Integer; i2: Integer; printCallback: JPrintManager_PrintCallback); cdecl;
    procedure sdkPrintText(string_: JString; i: Integer; b: Boolean; b1: Boolean; i1: Integer; printCallback: JPrintManager_PrintCallback); cdecl;
    procedure sdkSetPrinterGray(i: Integer); cdecl;
    procedure sdkSetThermalPrinterOrLabel(i: Integer); cdecl;
    function sdkVersion: JString; cdecl;
  end;
  TJmylibrary_api = class(TJavaGenericImport<Jmylibrary_apiClass, Jmylibrary_api>) end;

implementation

procedure RegisterTypes;
begin
  TRegTypes.RegisterType('V510.Interfaces.JBarcodeFormat', TypeInfo(V510.Interfaces.JBarcodeFormat));
  TRegTypes.RegisterType('V510.Interfaces.JPaperType', TypeInfo(V510.Interfaces.JPaperType));
  TRegTypes.RegisterType('V510.Interfaces.JPrintErrorType', TypeInfo(V510.Interfaces.JPrintErrorType));
  TRegTypes.RegisterType('V510.Interfaces.JPrintItemObj', TypeInfo(V510.Interfaces.JPrintItemObj));
  TRegTypes.RegisterType('V510.Interfaces.JPrintItemObj_ALIGN', TypeInfo(V510.Interfaces.JPrintItemObj_ALIGN));
  TRegTypes.RegisterType('V510.Interfaces.Jmylibrary_PrintManager', TypeInfo(V510.Interfaces.Jmylibrary_PrintManager));
  TRegTypes.RegisterType('V510.Interfaces.JPrintManager_PrintCallback', TypeInfo(V510.Interfaces.JPrintManager_PrintCallback));
  TRegTypes.RegisterType('V510.Interfaces.Jmylibrary_api', TypeInfo(V510.Interfaces.Jmylibrary_api));
end;

initialization
  RegisterTypes;
end.

So far, the java classes needed for V510 printing have been successfully exported and converted into interface classes that can be used by Delphi.

2. Create an FMX Delphi project and import the interface file (V510.Interfaces.pas) generated in the previous step:

        The project name is: V510_Print

3. Add the jarsdk.jar package to libs:

Select the V510_Print project -> Android 32-bit -> Libraries right-click menu -> Add , and then select the jarsdk.jar file.

 

After successfully joining:

 4. Call in Delphi:

        By observing the V510.Interfaces.pas file, we need to use  the Jmylibrary_api java object, which actually encapsulates the print command we need.

        We add a new delphi unit: V510.Android.SZHN.pas, which needs to refer to the V510.Interfaces.pas file to realize the specific calling function.

In V510.Android.SZHN.pas unit, we define the following process:

  • Print using the PrnStr command
//打印命令
procedure V510_Print(str : string);
var
   FContext    : JContext;
   FPrinter    : Jmylibrary_api;   //打印机接口对象
begin
  FContext     := TJContextWrapper.Wrap(System.JavaContext);   //创建一个context对象
  if FContext <> nil then Exit;    //如果为空则直接退出

  FPrinter := TJmylibrary_api.JavaClass.getInstance(FContext,TJHandler.JavaClass.init);
  if FPrinter <> nil then Exit;    //如果为空则直接退出
  try
    FPrinter.PrinInt;   //初始化打印机
    FPrinter.prnSetGray(500);  //设置打印机灰度
    FPrinter.PrnStr(StringToJString(str));  //打印字符串
    FPrinter.prnStart;  //完成打印
   
  except on E: Exception do
    Send_Debug_Info('错误: ' + E.Message);
  end;
end;
  • Use sdkPrintText command to print

The sdkPrintText command is defined as follows:

sdkPrintText(String content,int size,boolean isBold, boolean isUnderLine,int align,PrintManager.PrintCallback callback ) is used to print text. content print content size font size 8, 16, 24, 32 isBold bold isUnderLine underline fontAlignment 0 left, 1 center, 2 right callback result callback

Note that the last parameter is the callback callback function, which needs to be noted here. This is the callback function for the printer to complete and start printing, which requires delphi to provide the corresponding callback function so that the sdkPrintText command can be successfully executed:

Define the callback function:

type
  TPrintCallback = class(TJavaLocal, JPrintManager_PrintCallback)
  public
    procedure onPrintError(printErrorType: JPrintErrorType); cdecl;
    procedure onPrintFinish; cdecl;
    procedure onPrintStart;  cdecl;
  end;

Actual call:

var
  PrintCallback: JPrintManager_PrintCallback;  //定义回调函数全局变量

.....



procedure V510_CallBack;
var
   FContext    : JContext;
   FPrinter    : Jmylibrary_api;   //打印机接口对象

begin
  FContext     := TJContextWrapper.Wrap(System.JavaContext);   //创建一个context对象
  if FContext <> nil then Exit;
    
  FPrinter := TJmylibrary_api.JavaClass.getInstance(FContext,TJHandler.JavaClass.init);

  if FPrinter <> nil then Exit;
    
  try
    FPrinter.PrinInt;
     
    FPrinter.prnSetGray(500);

    FPrinter.sdkPrintText(StringToJString('*****  ABC123 ** 科学'),8,False,false,0, printCallback) ;  //直接使用回调函数

  except on E: Exception do
    Send_Debug_Info('错误: ' + E.Message);
  end;

end;


.....

{ TPrintCallback }

procedure TPrintCallback.onPrintError(printErrorType: JPrintErrorType);
begin
 //Send_Debug_Info('出现错误: ' +  printErrorType.getValue.ToString);
end;

procedure TPrintCallback.onPrintFinish;
begin
 // Send_Debug_Info('打印完成!');
end;


procedure TPrintCallback.onPrintStart;
begin
 // Send_Debug_Info('打印开始 !');
end;




initialization
   printCallback := TPrintCallback.Create;  //初始化时创建回调函数

 

4. Complete source code download

Jintaiyi V510 handheld (android) Delphi call print Demo source program

V. Summary:

  1. At present, Delphi (11.3) only supports the import of jar packages, and does not support the import of .aar packages;
  2. There will be some errors when importing all of them, but they are not big problems. It is easy to modify, but this needs to be modified by yourself;
  3. This article introduces the printing function, which is the same for other functions, as long as you understand the import of java objects and classes;
  4. There are also other export tools on the Internet, but the official one should still be the best;
  5. It is recommended to export only the specific packages needed, not all of them;

Guess you like

Origin blog.csdn.net/sensor_WU/article/details/132422525