本文介绍了Delphi android应用程序正在升级Lennova A5000手机的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用Delphi 10 Seattle Trail版本来开发移动应用程序。而且我试图创建只包含TEditBox的新的Android移动应用程序。然后通过将选项设置为Release进行编译。然后,生成.apk文件,然后将该文件提供给用户。当用户尝试点击编辑框时,应用程序会出现该应用名未响应的错误消息。 用户正在使用 Lennova A5000 ,而Os是Android 5.0.2。 同样的应用程序正在我的Moto g2(5.0.2 )和Micromax Yureka。 请提供我是否有任何解决方案。 此外,我已经在谷歌应用商店更新了应用程序。然后,它显示为此设备的不兼容的应用程序(Lennova A5000)。 此外,我还更新了所有的Android SDK包。之后,它也提出了同样的问题。 我认为这可能是Embarcadreo Delphi或任何丢失的软件包的问题? 提前感谢解决方案阿特拉斯我得到了Embarcadreo网站的解决方案。请按照上述步骤操作。 1.将FMX.Platform.Android.pas从源/ fmx文件夹复制到项目文件夹,并将复制的文件添加到该项目。 然后,执行以下过程中的更改。 程序TPlatformAndroid.RunOnUIThread(Proc:TThreadProcedure); procedure TPlatformAndroid.RunOnUIThread(Proc:TThreadProcedure); begin //MainActivity.runOnUiThread(TSimpleProcedureRunner.Create(Proc)); CallInUIThread( procedure() begin Proc; end); 结束 程序TPlatformAndroid.SynchronizeOnUIThread(Proc:TThreadProcedure); 程序TPlatformAndroid.SynchronizeOnUIThread(Proc:TThreadProcedure); var Runner:TSimpleProcedureRunner; begin // CallInUIThread( // procedure() // begin // Runner:= TSimpleProcedureRunner.Create(Proc); / / MainActivity.runOnUiThread(Runner); // Runner.Event.WaitFor; // end); CallInUIThreadAndWaitFinishing( procedure() begin Proc; end); 结束 程序TPlatformAndroid.SetClipboard(Value:TValue); 程序TPlatformAndroid.SetClipboard(Value:TValue); var Setter:TClipboardSetter; begin Setter:= TClipboardSetter.Create(Value.ToString); CallInUIThread( procedure() begin SharedActivity.runOnUiThread(Setter); end); Setter.Done.WaitFor(INFINITE); 结束 功能TPlatformAndroid.GetClipboard:TValue; 函数TPlatformAndroid.GetClipboard:TValue; var Getter:TClipboardGetter; begin Getter:= TClipboardGetter.Create; CallInUIThread( procedure() begin SharedActivity.runOnUiThread(Getter); end); Getter.Done.WaitFor(INFINITE); 结果:= Getter.Value; 结束 然后,重建项目。这样做后,每件事情都可以正常工作。 I'm using Delphi 10 Seattle trail version for developing mobile application. And I tried to create new android mobile application which contains only TEditBox. And then compiled by setting the option as "Release". Then, generated the .apk file and then provided the file to the user. And when the user tried to click the edit box, the application raises the error message that "The Appname is not responding".The user is using the Lennova A5000 and the Os is Android 5.0.2.And the same application is running in my Moto g2 (5.0.2) and Micromax Yureka.Please provide me is there any solution. Also, I have updated the app in google app store. Then, it is showing as incompatible application for this device (Lennova A5000).And also I have updated all the android SDK packages. After that also, it is raising the same issue.I think this may be problem to Embarcadreo Delphi or any missing packages? Dont know what to do. Thanks in advance. 解决方案 Atlast I got the solution from Embarcadreo website. Please follow the mentioned steps.1.Copy FMX.Platform.Android.pas to the project folder from source/fmx folderand add the copied files to the project.Then, do the changes in the following procedures.procedure TPlatformAndroid.RunOnUIThread(Proc: TThreadProcedure);procedure TPlatformAndroid.RunOnUIThread(Proc: TThreadProcedure);begin //MainActivity.runOnUiThread(TSimpleProcedureRunner.Create(Proc)); CallInUIThread( procedure() begin Proc; end);end;procedure TPlatformAndroid.SynchronizeOnUIThread(Proc: TThreadProcedure);procedure TPlatformAndroid.SynchronizeOnUIThread(Proc: TThreadProcedure);var Runner: TSimpleProcedureRunner;begin// CallInUIThread(// procedure()// begin// Runner := TSimpleProcedureRunner.Create(Proc);// MainActivity.runOnUiThread(Runner);// Runner.Event.WaitFor;// end); CallInUIThreadAndWaitFinishing( procedure() begin Proc; end);end;procedure TPlatformAndroid.SetClipboard(Value: TValue);procedure TPlatformAndroid.SetClipboard(Value: TValue);var Setter: TClipboardSetter;begin Setter := TClipboardSetter.Create(Value.ToString); CallInUIThread( procedure() begin SharedActivity.runOnUiThread(Setter); end); Setter.Done.WaitFor(INFINITE);end;function TPlatformAndroid.GetClipboard: TValue;function TPlatformAndroid.GetClipboard: TValue;var Getter: TClipboardGetter;begin Getter := TClipboardGetter.Create; CallInUIThread( procedure() begin SharedActivity.runOnUiThread(Getter); end); Getter.Done.WaitFor(INFINITE); Result := Getter.Value;end;Then, Rebuild the project. After doing this every thing is working fine. 这篇关于Delphi android应用程序正在升级Lennova A5000手机的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 22:45