15-04-2021, Saat: 23:34
(15-04-2021, Saat: 21:02)41linea41 Adlı Kullanıcıdan Alıntı:(29-03-2021, Saat: 22:06)savasabd Adlı Kullanıcıdan Alıntı: Site yönetimi açısından bir sıkıntı olur mu bilmiyorum ama buyrun:Merhaba
The reported issue (a segmentation fault raised after an attempt to call the 'u_strFromUTF8WithSub' ICU function) has not been reproduced before due to the fact that, an application that has the value of the 'targetSdkVersion' manifest attribute lesser than/equal to '28' runs on 'compatibility mode' on an 'Android 10.0' device [1]:
After changing the value of the 'targetSdkVersion' attribute to '29', an application no longer runs on the mentioned 'compatibility mode' and, therefore, the 'dynamic linker' fails to load the 'ICU' libraries (these libraries are used in the implementation of helper methods for string handling). There is an important axiom that is valid for devices running an Android version greater than/equal to '5.0':
BUG FIX
Please the bug provided here is aimed to update the uses of the 'dlopen' function in the 'ICU.inc' file (it is included into the 'System.pas' one) according to the above Android axiom. These are the steps needed to address the reported issue:
- Open the 'Windows Explorer' application.
- On the 'Windows Explorer' application...
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\source' folder.
- Copy the files from the 'missing_source_files.zip' attachment [1] to the current folder.
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\source\rtl\sys' folder.
- Open the 'ICU.inc' file in a text editor application (please backup the original version of the 'ICU.inc' file for safety purposes).
- On the text editor application...
- Change the definition of the 'InitICU' global function:
From
function InitICU: Boolean; ... begin ICUVersionNumber := -1; Result := False; {$IFDEF MACOS} HICUUC := dlopen('/usr/lib/libicucore.dylib', RTLD_LAZY); HICUI18N := HICUUC; {$ELSEIF defined(LINUX)} HICUUC := OpenICU_Lib('libicuuc.so'); HICUI18N := OpenICU_Lib('libicui18n.so'); {$ELSEIF defined(ANDROID32)} HICUUC := dlopen('/system/lib/libicuuc.so', RTLD_LAZY); HICUI18N := dlopen('/system/lib/libicui18n.so', RTLD_LAZY); {$ELSE defined(ANDROID64)} HICUUC := dlopen('/system/lib64/libicuuc.so', RTLD_LAZY); HICUI18N := dlopen('/system/lib64/libicui18n.so', RTLD_LAZY); {$ENDIF} ... end;
To
function InitICU: Boolean; ... begin ICUVersionNumber := -1; Result := False;{$IFDEF MACOS} HICUUC := dlopen('/usr/lib/libicucore.dylib', RTLD_LAZY); HICUI18N := HICUUC;{$ELSEIF defined(LINUX)} HICUUC := OpenICU_Lib('libicuuc.so'); HICUI18N := OpenICU_Lib('libicui18n.so');{$ELSE defined(ANDROID)} HICUUC := dlopen('libicuuc.so', RTLD_LAZY); HICUI18N := dlopen('libicui18n.so', RTLD_LAZY);{$ENDIF} ... end;- Save the changes done to the 'ICU.inc' file.
- Switch back to the 'Windows Explorer' application.
- Navigate to the '%USERPROFILE%' folder.
- Copy the 'build.bat' file from the 'build_script.zip' attachment [2] to the current folder.
- NOTE: Running that script causes the build artifacts from the compilation of the 'System' unit to be created in the '%USERPROFILE%\build' folder. Please use the 'OUTPUT_PATH' variable to change the path to those build artifacts. The changes done to the 'ICU.inc' file are not supposed to break the DCU compatibility of the 'System' unit and, therefore, the only build artifact that interests here is the 'System.o' file.
- Run the 'build.bat' file.
- Switch back to the 'Windows Explorer' application.
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android\debug' folder.
- Copy the 'System.o' file from the '%USERPROFILE%\build\android\debug' folder to the current folder (please backup the original version of the 'System.o' file for safety purposes).
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android\release' folder.
- Copy the 'System.o' file from the '%USERPROFILE%\build\android\release' folder to the current folder (please backup the original version of the 'System.o' file for safety purposes).
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android64\debug' folder.
- Copy the 'System.o' file from the '%USERPROFILE%\build\android64\debug' folder to the current folder (please backup the original version of the 'System.o' file for safety purposes).
- Navigate to the 'C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android64\release' folder.
- Copy the 'System.o' file from the '%USERPROFILE%\build\android64\release' folder to the current folder (please backup the original version of the 'System.o' file for safety purposes).
Please let me know if the mentioned steps are not addressing the reported issue.
Thankfully,
Horácio Filho
Yukarda bahsettiği dosyalar ekte.
Bu işlemi yaptıktan sonra SDK ayarlarını yeniden yükleyince yine android 11 üzerine debug yapamadım. "App not Installed." hatası alıyorum.
Son sdk manager sayfası görünümü şu şekilde:
APi 30 dosyalarını internetten indirip api leveli api 30 klasörü olarak gösterdim. tüm işlemleri tekrar yaptım.
"App not installed" hatası almaya devam ediyorum. Ne tavsiye edersiniz?
İyi çalışmalar.
NDK ayarlarını da yaptığınızı varsayarak, bu tür durumlar farklı bir sertifika ile uygulama imzalandığında olur genellikle, telefondan uygulamayı önce de belirttiğim şekilde temizleyin ve projeyi de temizleyin (projeye sağ tıklayıp clean'a basarak) hatta Debug klasörünü kontrol edip dosya varsa silin ve tekrar deneyin.
Herhangi bir basit problem, hakkında yeterince toplantı yapılarak, çözümsüz hale getirilebilir.
https://play.google.com/store/apps/developer?id=ONGUN
https://play.google.com/store/apps/developer?id=ONGUN

