2013-08-05 48 views
0

我使用詹金斯構建使用ORMLite,我收到以下錯誤一個Android庫項目,我真的不知道該如何解決:的Android詹金斯建立自己的錯誤

[javac] /Users/x/Desktop/workspace/x/src/com/x/x/database/DatabaseHelper.java:109: 
    type parameters of <D>D cannot be determined; no unique maximal instance exists 
    for type variable D with upper bounds com.x.x.database.dao.DatabaseObjectDao, 
    com.j256.ormlite.dao.Dao<com.x.x.database.entity.UserEntity,?> 
[javac] sUserEntityDao = getDao(UserEntity.class); 

任何幫助將是真的偉大:)

+0

[爲什麼編譯器狀態不存在唯一的最大實例?](http://stackoverflow.com/questions/5666027/why-does-the-compiler-state-no- unique-maximal-instance-存在) – Gray

回答

0

所以下面可能是錯誤的,但我會留下後代。我最初認爲這是一個ORMLite錯誤,但現在我認爲這是一個編譯器錯誤。

我想你應該看看這個提問/回答:

Why does the compiler state no unique maximal instance exists?


這可能是如果該異常樹的一部分,可能有一個ORMLite錯誤有一些消息給效果:

Could not find OpenHelperClass because none of the generic parameters of class 
YourActivityClass extends OrmLiteSqliteOpenHelper. You should use 
getHelper(Context, Class) instead. 

Android應用程序的簡單ORMLite模式是讓活動延伸OrmLiteBaseActivity<YourDatabaseHelper>。喜歡的東西:

public class HelloAndroid extends OrmLiteBaseActivity<DatabaseHelper> { 

然後當你調用getHelper(),ORMLite可以計算出自動將要使用的DatabaseHelper輔助類。還有其他方法可以爲ORMLite設置接線。我會看看Android starting docs,然後看看Android example programs