DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: pixelcraft
今日帖子: 53
在线用户: 18
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2023/2/17 15:58:53
标题:
d11.1 中只做了个空壳的App在安卓11中闪退 浏览:969
加入我的收藏
楼主: 什么也没有做,就是做了几个图标及启动画面,一个窗口,然后闪退,请教一下,是哪里的设置不对呢?

procedure TMainPage_Fm.Button1Click(Sender: TObject);
begin
  Application.CreateForm(TMainPagec_Fm,MainPagec_Fm);
  MainPageC_Fm.Show;
end;

procedure TMainPage_Fm.Button2Click(Sender: TObject);
begin

  Close;
end;


另外一个窗口中:
implementation
uses MainPage;

procedure TMainPageC_Fm.Button2Click(Sender: TObject);
begin

  MainPage_Fm.Close;
end;
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2023/2/18 1:29:31
1楼: 1) 代码没有错!
2) 但是,这不是关闭应用程序的合适方式,因为必须考虑许多其他因素,例如,是否有其他任务必须先执行等...

1) Nothing wrong with the code!
2) However, it is not a suitable way to close the application, as many other factors must be taken into account, for example, if there is some other task that must be performed first, etc...

--- Form1-----
var
  Form1: TForm1;

implementation

{$R *.dfm}

uses
  Unit2;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Application.CreateForm(TForm2, Form2);
  Form2.Show;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  close;
end;

initialization

ReportMemoryLeaksOnShutdown := true;

end.
----------

---- Form2 ----
var
  Form2: TForm2;

implementation

{$R *.dfm}

uses
  Unit1;

procedure TForm2.Button1Click(Sender: TObject);
begin
  Form1.Close;
end;

end.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2023/2/18 10:19:54
2楼: initialization

ReportMemoryLeaksOnShutdown := true;

end.


重点么?
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2023/2/18 10:49:52
3楼: emailx45:关于闪退的问题,应该还有其他方面需要注意的吗?目前还是闪退,如果一开始就闪退的情况,那就不敢继续进行下去了。请赐教,谢谢
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2023/2/18 11:41:12
4楼: Delphi 11生成的app在有些手机的android11下会崩溃的问题,manifest.xml文件中加上这个标记就行了 禁用堆指针标记功能: 

android:allowNativeHeapPointerTagging='false'>

简短的测试后,发现闪退崩溃的问题,解决了
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 bbnn38 (伟大的咸鱼) ★☆☆☆☆ -
普通会员
2023/2/19 22:13:35
5楼: 留名关注
----------------------------------------------
-
作者:
男 chinaz (有缘人) ★☆☆☆☆ -
神秘会员
2023/2/19 22:52:46
6楼: 关注。。。
----------------------------------------------
一路风雨走过,因为有你们
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行128.9063毫秒 RSS