question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make project fail: must be a visible abstract class

See original GitHub issue

DBFlow Version: 5.0.0-alpha1

Bug or Feature Request: build fail When I Click “Make Project” then shows the log below:

========== :com.example.monkey.xposedhookdemo.TestDataBase must be a visible abstract class that extends com.dbflow5.config.DBFlowDatabase*==========* 错误: java.lang.Thread.getStackTrace(Thread.java:1552) 错误: com.dbflow5.processor.ProcessorManager.logError(ProcessorManager.kt:212) 错误: com.dbflow5.processor.ProcessorManager.logError(ProcessorManager.kt:219) 错误: com.dbflow5.processor.definition.DatabaseDefinition.<init>(DatabaseDefinition.kt:82) 错误: com.dbflow5.processor.DatabaseHandler.onProcessElement(Handlers.kt:229) 错误: com.dbflow5.processor.BaseContainerHandler.handle(Handlers.kt:194) 错误: com.dbflow5.processor.ProcessorManager.handle(ProcessorManager.kt:233) 错误: com.dbflow5.processor.DBFlowProcessor.process(DBFlowProcessor.kt:67)

My Code: `@Database(name = TestDataBase.NAME, version = TestDataBase.VERSION) public class TestDataBase {

//数据库名称
public static final String NAME = "MyDatabase";
//数据库版本号
public static final int VERSION = 1;

}`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
agrosnercommented, Nov 7, 2018

move the database name to the FlowConfig:

 FlowManager.init(FlowConfig.Builder(context)
                        .database(DatabaseConfig.builder(TestDatabase::class, AndroidSQLiteOpenHelper.createHelperCreator(context))
                        .databaseName("MyDatabase")
                                .build())
                        .build())

name in the Database annotation should have been removed. It will be removed in 5.0.0-alpha2.

1reaction
agrosnercommented, Nov 7, 2018
========== :com.example.monkey.xposedhookdemo.TestDataBase must be a visible abstract class that extends com.dbflow5.config.DBFlowDatabase*==========*

yes this is the message. you have to change your db from

@Database(name = TestDataBase.NAME, version = TestDataBase.VERSION)
public class TestDataBase {
  public static final String NAME = "MyDatabase";
  public static final int VERSION = 1;
}

to:

@Database(name = TestDataBase.NAME, version = TestDataBase.VERSION)
public abstract class TestDataBase extends DBFlowDatabase {
  public static final String NAME = "MyDatabase";
  public static final int VERSION = 1;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Limiting visibility of abstract base classes in C# - Stack Overflow
It depends on what you want. Do you want to prohibit all use of the base abstract class by client code outside the...
Read more >
Abstract class cannot be instantiated seen during elaboration
In our case we were including the abstract class file in our env code. Temporary work around is to move the `include to...
Read more >
7531 Incorrect 'Class must implement method or be declared ...
IDEA displayed the same error message in the same class, ... I can build and run the project, no problem, but the incorrect...
Read more >
Unexpected behavior with abstract test classes #1222 - GitHub
To resolve the issue and make the above ConcreteTest execute, the abstract superclass must 1) have his public access modifier removed, or 2)...
Read more >
Eclipse shows error for generic type extending abstract class ...
Either make the type abstract or make the inherited method visible So the eclipse compiler somehow seems to think that the class is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found