Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

IllegalStateException with AndroidAnnotations 4.1 and @EViewGroup / @OrmLiteDao #2048

@ytakahashi1981

Description

@ytakahashi1981

I have the same issue as #1887.
I updated #1887, but there is no response maybe due to issue status(closed).

I cannot upgrade AA to 4.x because of upgration cost with this issue...
(many many views are using OrmLiteDao annotations in my product...)

Maybe you can reproduce with these simple sources.
(My AA version is 4.3.1 but reproduced with 4.1)

TestDao.java

public class TestDao extends BaseDaoImpl<TestEntity, Integer> {
	protected TestDao(ConnectionSource connectionSource, Class<TestEntity> dataClass) throws SQLException {
		super(connectionSource, dataClass);
	}
}

TestEntity.java

@DatabaseTable(tableName = "Test", daoClass = TestDao.class)
public class TestEntity {
}

TestView.java

@EViewGroup
public class TestView extends FrameLayout {

	@OrmLiteDao(helper = DBHelper.class)
	TestDao testDao;

	public TestView(@NonNull Context context) {
		super(context);
	}

}

DBHelper.java

public class DBHelper extends OrmLiteSqliteOpenHelper {
	public DBHelper(Context context) {
		super(context, "test.db", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) {}

	@Override
	public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {}
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions