[Android Development] Summary of EventBus3 Usage Course

First, what is EventBus? EventBus is an Android-side optimized publish/subscribe message bus, which simplifies the communication between components in the application, between components and background threads, such as network requests, and when the network returns, it notifies the UI through Handler or Broadcast. The communication between tw ...

Posted by taya on Fri, 22 Mar 2019 21:33:52 -0700

Solution of Spring Boot JPA Entity Jackson Serialization Triggering Lazy Load

Spring Jpa technology is often used in Spring development. Entity's Association lazy loading is used in today's project, but when returning to Json, data serialization will be triggered regardless of whether the association data is loaded or not. If the association relationship is not loaded, it is a Hibernate Proxy, not real data, which result ...

Posted by bpops on Mon, 04 Mar 2019 18:21:23 -0800

android studio 3.0 preview uses kotlin to write android, discarding findviewbyid

Listen to the use of kotlin can find the control without findviewbyid, Xiaosheng can't wait to try, the result... Without a careful look at the official documents, we are inexperienced and in a hole. <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/a ...

Posted by SycoSyco on Tue, 12 Feb 2019 01:12:20 -0800

Access Google + login SDK prompt google-services.json is missing

Download the official demo when accessing google + to the SDK, and then a bunch of problems, so install the latest libraries of the installation. But there are still the following mistakes. Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources ...

Posted by shakuni on Mon, 11 Feb 2019 22:48:18 -0800

AS error "Plugin with ID'com. android. application'not found"

_When importing downloaded AS projects, we often encounter "Plugin with id'com.android.application'not found". This happens because the project lacks a build.grade. Com. android. application comes from com.android.tools.build:gradle:2.3.0 (version may be different). And com.android.tools.build:gradle:2.3.0 is defined in build.grade ( ...

Posted by nnichols on Sat, 09 Feb 2019 19:39:18 -0800

Android jni development-2 (add jni that supports cmake compilation to old projects)

In the previous article, I introduced how to build a new project with ndk. What if I add jni to the old project? 1. Create a new CPP folder under the app/main folder and a new. cpp file in the CPP folder: 2. Create a new tool class: public class JniUtil { static { System.loadLibrary("jni_lib"); } public native String ...

Posted by voltrader on Sat, 09 Feb 2019 04:51:17 -0800

Failed to resolve: com.android.support:appcompat-v7:27.0.1 problem solving

Today, without warning, Android Studio has had another gust, spent most of the day trying many solutions on the Internet, and finally solved the problem. Let's go step by step. Step 1: This is the first bug Error:Failed to resolve: com.android.support:support-annotations:27.0.1 Install Repository and sync projectOpen ...

Posted by spdwrench on Fri, 08 Feb 2019 01:51:17 -0800

Using GRPC and protobuf in android studio Kotlin

Using GRPC and protobuf in Android studio Kotlin gRPC Java now provides development and usage support for Kotlin projects built with Gradle. //Three core packages for adding grpc // You need to build grpc-java to obtain these libraries below. implementation "io.grpc:grpc-okhttp:$CURRENT_GRPC_VERSION" // CURRENT_ ...

Posted by Chunk1978 on Mon, 04 Feb 2019 17:30:17 -0800

Gradle multi-channel packaging

Multi-channel packaging based on umeng statistics in Studio. 1. Configuring the Alliance Environment Add relevant information in the < Application > tag of AndroidMainfest.xml: APP_KEY and channel number. Here the channel number is just a placeholder, which can dynamically replace the information in the placeholder during the ...

Posted by kratos-2012 on Sun, 03 Feb 2019 08:51:16 -0800

Android Studio uses Gradle to organize clearer packaging scripts

Preface When we first wrote gradle scripts, we usually wrote all the packaged scripts in the build.gradle file, which is easy to cause problems. Dependent version duplication of build.gradle configuration or inconsistency of compileSdkVersion of multiple modules in the project; It will lead to some dependency duplication and confl ...

Posted by franklyn on Sun, 03 Feb 2019 01:45:15 -0800