2012-05-08 34 views
1

我在不同的項目中有兩個類。如何修復android中的NoClassFoundError

我正在導入具有所需類的項目。 現在,我沒有錯誤。

該項目知道這個類,我甚至從這個類中創建了一個對象,但是當我試圖運行它時,它會使用"NoClassFoundError"來粉碎。

我該如何解決這個問題?

import com.dmg.pixelservice.core.*; 
import android.app.Activity; 
import android.os.Bundle; 
public class show extends Activity { 
/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    Pixel pixel = new Pixel(); 
    pixel.doIt(this,"fd7ccf36-3f85-11e1-8671-40409e0f44a1",true); 
    setContentView(R.layout.main); 
} 
} 

當我調試,我可以看到它時,我試圖做像素像素=全新的像素()崩潰;

請幫忙。

+1

看到這個答案http://stackoverflow.com/a/10046725/1289716的 – MAC

+0

可能重複[Android的更新似乎17與外部罐子不兼容](http://stackoverflow.com/questions/10046298/android-update-17-seems-incompatible-with-external-jars) – waqaslam

+0

我需要創建一個導入的項目的jar文件嗎? – roiberg

回答

1

創建新庫在您的應用程序文件夾。名稱必須是same.and把你的jar文件在此folder.and 去 Java構建路徑 - >配置構建路徑 - >添加罐子

0

如果您發送Pixel類的src代碼,很容易發現錯誤。

相關問題