مهم ترین تغییرات این نسخه:
بالا رفتن و چندین برابر شدن سرعت اجرای پروژه ها با روش جدید کامپایل
پشتیبانی از جاوا ورژن 8
دیگه مشکل رپ کردن و استفاده از کتابخانه هایی که با جاوا 8 نوشته شدن وجود نداره،
[H1]B4A v11.50 has been released![/H1]
One of the major steps during compilation is the conversion of the Java bytecode into Android (Dalvik) runtime bytecode. It is called "dexing". This was done by the optimized dexer which was implemented before B4A v1.00 was released. The main problem with the previous tool was the lack of support for Java 8 features, which are now used by many newer SDKs.
The workarounds didn't always work.
Starting from v11.50 the optimized dexer was removed and B4A uses Google's D8 tool during compilation. It is more powerful and it is also faster, especially with larger projects, as it allows implementing incremental compilation. Libraries are dexed once when needed. The code is also dexed incrementally.
Other than that this version also adds support for targetSdkVersion = 31. I still recommend setting it to 30 for now.
- Optimized dexer replaced with D8 tool.
- Support for targetSdkVersion=31.
- New #ExcludedLib attribute that is required in some cases when multiple native libraries with different versions are referenced.
- Updated internal libraries: OkHttp v1.50, OkHttpUtils2 v3.00, PreoptimizedCLV v1.21, Network v1.53, B4XTable v1.22, KeyValueStore v2.31, SMM v1.12, NB6 v1.02, FirebaseNotifications v2.01, B4XCollections v1.13
- #ExcludedClasses attribute removed.
- Bug fixes and other minor improvements.
If you want to set targetSdKVersion to 31 then the main changes are:
- When requesting the fine location permission the user can choose to limit your app to coarse location. The code to handle it is:
- With a few exceptions it is no longer possible to start services in the background. One of the consequences of this restriction is that push notification messages should be sent as high priority messages. You need to set it in the B4J sending code:
- StartServiceAt / StartServiceAtExact: You need to use StartServiceAtExact and add this "non-dangerous" permission: