Search code examples
javaandroidandroid-studioactiveandroid

Why the Active Android Library reports this error = Before Android 4.1, ... would have incorrectly overridden the package-private method in Drawable


I use the Active Android Library, and every time I launch it, it will be displayed to me in the Logcat (Android Studio) , Error Type = Warning

Picture of the complete program error

enter image description here

  • I also want to know if this problem does not cause me a problem like Force Stop

The first two lines of program error (Warning):

Logcat

    01-04 12:20:20.378 2166-2166/com.xxxx.yyyy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
    01-04 12:20:20.419 2166-2166/com.xxxx.yyyy I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.app.JobIntentService$JobServiceEngineImpl>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/app/job/JobServiceEngine;
...

AppController.java

    public class AppController extends Application {

        @Override
        public void onCreate() {
            super.onCreate();
            ActiveAndroid.initialize(this);
        }

    }
...

AndroidManidest.xml

...
    <application
        android:name=".AppController"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@stylexxyyTheme"
        tools:replace="android:icon">

        <meta-data
            android:name="AA_DB_NAME"
            android:value="RestClient.db" />
        <meta-data
            android:name="AA_DB_VERSION"
            android:value="1" />
        <meta-data
            android:name="AA_MODELS"
            android:value="com.xxxx.yyyyy.model.DBUserInfo" />
...

DBUserInfo.java

@Table(name = "user_info")
public class DBUserInfo extends Model {

        @Column(name = "user_id", unique = true, onUniqueConflict = Column.ConflictAction.REPLACE)
        public int user_id;
        @Column(name = "name")
        public String name;

        public DBUserInfo() {
            super();
        }

        public DBUserInfo(int user_id, String name) {
            this.user_id = user_id;
            this.name = name;
        }

        public static DBUserInfo getRandom() {
            return new Select().from(DBUserInfo.class).executeSingle();
        }


        public static DBUserInfo getUserInfo() {
            return new Select().from(DBUserInfo.class).executeSingle();
        }

        public List<DBUserInfo> getAll() {
            return getMany(DBUserInfo.class, "name");
        }

        public static List<DBUserInfo> getAll() {
            return new Select().from(DBUserInfo.class).orderBy("user_id ASC").execute();
        }
    }

Solution

  • I don't see any code related to your error. Did you share the code where the issue happens? Are you testing on a KitKat or previous device? KitKat and older have issues with Vector Graphics and you have to enable Vector Support as well as handle the vectorSupport tag on src on all images. So I have to assume you have drawable vectors in your project and have put these in the wrong folder or have not properly handled them based on that error, but without more details, that is only a speculation.

    Keep in mind folders like no-dpi didn't exist in KitKat days as well as memory issues happen like crazy if not managed very meticulously.