Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link
@ytakahashi1981

Description

@ytakahashi1981
Issue body actions

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) {}
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.