PullLoad MoreRecycleView Flash Problem after Android Studio 3.3 Upgrade

PullLoad MoreRecycleView Flash Problem after Android Studio Upgrade

PullLoadMoreRecycleView It's a nice drop-down refresh library and a pull-up load refresh library. But it hasn't been updated for a long time.

To develop new functionality today, we found that the list interface using PullLoad MoreView would flip back and debug all the way into the source code. (Normally, the source code would not be a problem, maybe the old version of recycleView could not be used after the environment of the project was updated.)

The problem is in inflate, just flip back.
The resourceID could not be found at the prompt.

    public View inflate(@LayoutRes int resource, @Nullable ViewGroup root, boolean attachToRoot) {
        final Resources res = getContext().getResources();
        if (DEBUG) {
            Log.d(TAG, "INFLATING from resource: \"" + res.getResourceName(resource) + "\" ("
                    + Integer.toHexString(resource) + ")");
        }

        final XmlResourceParser parser = res.getLayout(resource);
        try {
            return inflate(parser, root, attachToRoot);
        } finally {
            parser.close();
        }
    }

When you encounter source code problems, you can only update recycleView.

In the latest Google Project Architecture Guide, AndroidX is recommended to replace the supoort package.

This means that new extensions will no longer be introduced in the form of supoort. The new extensions will be put in Android X. I think it may be for easy management.

Upgrade to AndroidX portal

Upgrading to AndroidX will migrate all the related controls used in the support library to the Androidx package

Then the question comes. What about the reference of tripartite libraries???

In this case, errors will be reported when compiling and running. According to the related errors, the library problems of that part will be found and upgraded to the latest version. Some active libraries have been updated to the latest version, such as Butterknife-10.1.0 After updating to the latest version, remember to update the version of JDK

android {
  ...
  // Butterknife requires Java 8.
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

What about tripartite libraries that haven't been updated for a long time, like Pull Load MoreRecycleView

  • You can update the author with issue or email prompts
  • down source code, moudle dependency,

PS: If you are prompted about gradle, you can upgrade the version of gradle.

The gradle-wrapper.properties file in the project root directory updates gradle to the latest version.

#Wed Aug 21 14:54:19 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

Upgrade gradle to the latest version in project build.gradle (3.4.2)

  dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

Finally, compile and run.
Everything is the same.

If you have any questions, please contact me.

xpg@alphathink.org

Keywords: Gradle Android ButterKnife Google

Added by Kurtismonger on Wed, 21 Aug 2019 11:08:22 +0300