limelect 48 Posted May 23, 2023 (edited) D11.3 CE. A simple program loads to S6 phone. just a button and label Loading complex program shows only this screen BRP here Application.Initialize; does not stop or oncreate form either So now how to debug ? 32bit No errors just stack Edited May 23, 2023 by limelect Share this post Link to post
programmerdelphi2k 237 Posted May 23, 2023 my first choice would be: excluding any "complex called" on form starting... like: while TRUE resulted, using threads, etc.. Share this post Link to post
limelect 48 Posted May 23, 2023 @programmerdelphi2k You miss the point. BRP here Application.Initialize; does not even break. It has nothing to do with my software as mine does not even start Share this post Link to post
limelect 48 Posted May 23, 2023 It has defently to do with d11.3 compilation Share this post Link to post
limelect 48 Posted May 24, 2023 A little history. Same software was compiled on D10.2.3 and WORKED !!!! on S2 phone. when i moved to S6 phone the software did not work. So i thought D11.3 will do the job. So i thought but Embarcadero is stronger then me. Never happened with Android studio Share this post Link to post
limelect 48 Posted May 27, 2023 And Embarcadero convince me to upgrade to something that does not work Share this post Link to post
Patrick PREMARTIN 71 Posted May 28, 2023 Hi Did you upgraded the Android manifest template file to the need one for 11.3 ? Did you updates the JAR libraries needed for the project in the project manager Android platform you compile ? (probably yes if it compiles, but check in case not) If you transfer the APK manually to an other device, does it starts or not ? Does the program starts when you compile it in DEBUG mode and start it with (or without) the debugger from the IDE ? 3 Share this post Link to post
Dave Nottage 557 Posted May 28, 2023 10 minutes ago, Patrick PREMARTIN said: Does the program starts when you compile it in DEBUG mode and start it with (or without) the debugger from the IDE ? Sometimes, due to a shortcoming with the IDE, the application gets "stuck" or crashes before the debugger has a chance to attach to the process. This can happen when a library required at initialization time is not present, or is not the right version. Without detail about the project (of which none at all so far has been provided), it'll be very difficult to diagnose. 1 Share this post Link to post
limelect 48 Posted May 29, 2023 1. I did try to install it by moving the APK to a directory on the phone -- the program does not start seeing only the icon as the picture shows 2. On a debug mode the form does not even start >>>> BRP here Application.Initialize; 3. This is a program on S2 that worked perfectly with D10 4. All compilation works without any errors or warnings. 5. I deleted the Android manifest template so it made a new one. 6. I think I did all possible things with my knowledge 7. I expect moving from 10 to 11 and compiling, not so old program, will be without any problems. 8. All Java is there and seen without any problems Share this post Link to post
Dave Nottage 557 Posted May 29, 2023 3 minutes ago, limelect said: 1. I did try to install it by moving... etc None of that information is going to help resolve the issue. Detail about what is in the application may go part way to solving it. Ideally, provide a reproducible test case, which will go a much longer way. Share this post Link to post
limelect 48 Posted May 29, 2023 This a window version for sending msg to WhatsApp the same (with a little change of screen) for Android Share this post Link to post
limelect 48 Posted May 29, 2023 (edited) One thing may be very important For left-right to work on Android, I have this files now I wonder if this is the problem although I doubt I will try NOT to use this files and see what happenes Edited May 29, 2023 by limelect Share this post Link to post
limelect 48 Posted May 30, 2023 (edited) Those files are not used so back to the basic problem Edited May 30, 2023 by limelect Share this post Link to post
limelect 48 Posted May 30, 2023 @Dave Nottage My problem has nothing to do with the kind of software as the program does not even start on the phone It has to do with d11 compilation. Share this post Link to post
limelect 48 Posted May 30, 2023 May i sugest an impruvment Embarcdero has to take my source and find out what is going on. But they won't Share this post Link to post
Dave Nottage 557 Posted May 30, 2023 1 minute ago, limelect said: My problem has nothing to do with the kind of software as the program does not even start on the phone It has to do with d11 compilation. I have projects from earlier versions of Delphi that I've successfully migrated to Delphi 11.x, mainly because I've been aware of any changes that may be necessary. It has everything to do with what is being used in the application, and zero to do with compilation. Since you appear to be unwilling to share anything about your app, it's extremely difficult to know what the issue is. 3 Share this post Link to post
limelect 48 Posted May 30, 2023 (edited) @Dave Nottage I will happily share with any serious programmer the source I do not see ANY reason for the transfer problem from D10.2.3 to D11. The components are standard And if professionals like all of us have to start with a learning curve it is not reasonable. After all, it is not like moving from D7 to D11. And especially that this software worked perfectly. Edited May 30, 2023 by limelect Share this post Link to post
Dalija Prasnikar 1396 Posted May 30, 2023 (edited) 1 hour ago, limelect said: I do not see ANY reason for the transfer problem from D10.2.3 to D11. The components are standard And if professionals like all of us have to start with a learning curve it is not reasonable. After all, it is not like moving from D7 to D11. Android development is very different from Windows development. Most likely cause of problems are changes and requirements for newer Android OS that were introduced in the meantime. It has nothing to do with compiler nor Delphi language. Google releases new Android version every year and to comply with those new OS releases and ability to upload applications on Play Store, Delphi Android applications need to support new OS and new Android SDK. There have been numerous changes between 10.2.3 and D11.3 considering Android development and your old application most likely uses features that were subject to change and that require additional or changed configurations or code. Without knowing which features you are using, it is impossible to say what needs to be changed. You can find list of changes and new requirements between releases in official Android documentation https://developer.android.com/tools/releases/platforms Also Delphi Android application runs inside a wrapper and if application crashes due to misconfiguration inside that wrapper, it will crash before any Delphi code starts running. That is why you cannot debug it. To understand what is happening and why it crashed you need to look at native Android error logs - logcat. Edited May 30, 2023 by Dalija Prasnikar 2 Share this post Link to post
limelect 48 Posted May 30, 2023 @Dalija Prasnikar I send @Dave Nottage the sources and will see what happens He found using logcat ( why I did not think about it ?) that there are problems with the java So if compilation is OK how one is expected to debug? Share this post Link to post
Dalija Prasnikar 1396 Posted May 30, 2023 18 minutes ago, limelect said: He found using logcat ( why I did not think about it ?) that there are problems with the java So if compilation is OK how one is expected to debug? Again, if application crashes inside Java wrapper side, then you cannot debug it with Delphi. You need to see what is exact error message and then Google what feature is this error connected to. Then look at changed requirements in the official Android documentation and make appropriate changes. Because native Java applications also suffer from same issues when upgrading, usually you can find plenty of resources which will give you answer about precise configurations needed even without going through official documentation. Creating new Delphi application and then including those problematic features can also help to pinpoint exact problem. Most likely there is some configuration problem in your application manifest. But there could be other issues, like wrong JAR libraries and similar. Once you get new Delphi application up and running, you can see the differences in configuration and apply necessary changes to the old one. Share this post Link to post
limelect 48 Posted May 30, 2023 @Dave Nottage found the problem it seems a directory was the problem changing to System.IOUtils.TPath.GetDocumentsPath Also, it seems that the debugger could not help since the program failed before starting only logcat helped And again great thanks to Dave for his help Share this post Link to post