Interesting, I found a magical bug in Kotlin!

1. ForewordThis article will introduce a bug in Kotlin from simple to deep through specific business scenarios, tell you the magic of the bug, then lead you to find the cause of the bug, and finally avoid the bug.2. bug recurrenceIn real development, we often have the problem of deserializing the Json string into an object. Here, we use Gson to ...

Posted by Madatan on Thu, 06 Jan 2022 08:11:42 +0100

Gradle and AGP build API: further improve your plug-in

Welcome to read MAD Skills Collection The third article on building API between Gradle and AGP. In the last article< Gradle and AGP build API: how to write plug-ins >You learned how to write your own plug-ins and how to use them Variants API. If you prefer to learn about this through video, please Click here see. In this article, yo ...

Posted by beachdaze on Thu, 06 Jan 2022 07:13:08 +0100

Android NDK development: the first Jni practice

NDK development: the first Jni practice The project source code and original documents are in Github: [Forgo7ten / AndroidReversePractice] 1. Create a ndk project using AS new a projectSelect template Native C++Next, modify the project name, package name, and directory. Next, Finish Directory structure: Android Developer documentation: A ...

Posted by gamma_raj on Wed, 05 Jan 2022 23:50:14 +0100

You should know kotlin's practical skills

prefaceAs we all know, kotlin is an android development language pushed by google to replace java kotlin is easy to use and has a lot of grammar This paper mainly explains some practical kotlin skillsCustom rounded rectangleIn projects, we often define rounded rectangular backgrounds, which are generally implemented with custom drawable Howe ...

Posted by vickie on Wed, 05 Jan 2022 20:56:53 +0100

Simple example of Android chart HelloCharts

summary Rendering, data can be panned to view history build.gradle implementation 'com.github.lecho:hellocharts-library:1.5.8@aar' layout Add corresponding chart controls directly to the layout <lecho.lib.hellocharts.view.LineChartView android:id="@+id/ChartLine" android:layout_width="0dp" android:layout_height="300dp" ...

Posted by maxat on Wed, 05 Jan 2022 15:08:24 +0100

BroadcastReceiver broadcast receiver

BroadcastReceiver broadcast receiver BroadcastReceiver is to facilitate the communication between various applications and internal programs of Android system. Android system introduces a set of broadcasting mechanism. Each application can register the broadcast of interest. When the system or other programs send the broadcast, the program tha ...

Posted by laPistola on Wed, 05 Jan 2022 12:01:25 +0100

android ijkplayer local compilation and debugging on Mac

1. Local compilation Set the environment variable, ndk to use version r10e ANDROID_SDK ANDROID_NDK System Preferences - > Security and privacy - > General - > app s that can be downloaded from the following location are set to any source Setting method: after the Terminal terminal is opened, enter at the command prompt sudo spct ...

Posted by TheAngst on Wed, 05 Jan 2022 09:20:15 +0100

Android mobile terminal development code specification and formatting tool

principle There are several principles that can help you write code that meets the specifications without looking at the documents: If it is to modify the existing code, it should be consistent with the surrounding style If the system SDK is used for development, unless otherwise specified, the style shall be consistent with the system SDK New ...

Posted by cbassett03 on Wed, 05 Jan 2022 05:36:39 +0100

Record of mixed development of fluent and Android

Mixed development mode: 1, Source code integration 2, Product integration: the Flutter project is developed separately and released in the form of aar package or IOS framework after development. The original project depends on the products output by Flutter Product integration Integrate fluent into existing Andriod projects 1. Create Android ...

Posted by eheia on Tue, 04 Jan 2022 22:23:32 +0100

Jetpack: use ActivityResult to handle data communication between activities

catalogue Foreword ActivityResult usage ActivityResultContract principle summary Foreword This article first introduces the basic use of ActivityResult, and finally discusses the principle behind it through the source code. In Android, if we want to transfer data between activities in two directions, we need to use startActivityFor ...

Posted by fractalvibes on Tue, 04 Jan 2022 17:51:42 +0100