2012-09-11 3 views
0

Android 2.2 용 Yfiles에서 작업하고 있습니다. 내가 도서관 자들에 의해 주어진 자습서를 가져 왔을 때. 그것은 다음 오류를 보여 주며 응용 프로그램이 실행되고 있지 않습니다. 어떤 사람이 다음과 같은 예외를 이해할 수 있다면 제발 정정하십시오.yFiles 안드로이드 라이브러리의 Android.View.InflateException

09-11 10:28:50.478: E/AndroidRuntime(11938): FATAL EXCEPTION: main 
09-11 10:28:50.478: E/AndroidRuntime(11938): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yworks.android/com.yworks.android.SampleApplication}: android.view.InflateException: Binary XML file line #8: Error inflating class com.yworks.yfiles.ui.GraphControl 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1872) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.os.Handler.dispatchMessage(Handler.java:99) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.os.Looper.loop(Looper.java:150) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread.main(ActivityThread.java:4389) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at java.lang.reflect.Method.invokeNative(Native Method) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at java.lang.reflect.Method.invoke(Method.java:507) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at dalvik.system.NativeStart.main(Native Method) 
09-11 10:28:50.478: E/AndroidRuntime(11938): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.yworks.yfiles.ui.GraphControl 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:250) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.Activity.setContentView(Activity.java:1742) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at com.yworks.android.SampleApplication.onCreate(SampleApplication.java:28) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836) 
09-11 10:28:50.478: E/AndroidRuntime(11938): ... 11 more 
09-11 10:28:50.478: E/AndroidRuntime(11938): Caused by: java.lang.ClassNotFoundException: com.yworks.yfiles.ui.GraphControl in loader dalvik.system.PathClassLoader[/data/app/com.yworks.android-1.apk] 
09-11 10:28:50.478: E/AndroidRuntime(11938): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.createView(LayoutInflater.java:471) 
09-11 10:28:50.478: E/AndroidRuntime(11938): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 
09-11 10:28:50.478: E/AndroidRuntime(11938): ... 20 more 

자바 파일은 다음과 같습니다

package com.yworks.android; 

import android.app.Activity; 
import android.os.Bundle; 
import com.yworks.yfiles.ui.GraphControl; 
import com.yworks.yfiles.ui.model.GraphExtension; 
import com.yworks.yfiles.ui.model.IGraph; 

/** 
* Getting Started - 01 Creating the View 
* 
* This demo simply introduces class {@link GraphControl}, the 
* central UI element for working with graphs in @[email protected], 
* and {@link GraphExtension}, which provides convenience 
* methods for working with IGraphs. 
*/ 
public class SampleApplication extends Activity { 

    private GraphControl graphControl; 
    private GraphExtension graphExtension; 

    @Override 
    protected void onCreate(final Bundle savedInstanceState) { 

     super.onCreate(savedInstanceState); 
     // Sets the content view to the main layout loaded from 
     // res/layout/main.xml 
     setContentView(R.layout.main); 
     // The GraphControl is declared in the loaded layout, 
     // so now we can retrieve a reference to it 
     graphControl = (GraphControl) findViewById(R.id.graphControl); 
     // GraphExtension provides convenience methods 
     // which are used in the following demos. 
     graphExtension = new GraphExtension(graphControl.getGraph()); 

    // We'll initialize the app here in the following demos. 
    } 

    /** 
    * Convenience property for getting the GraphControl's Graph 
    * @return The GraphControls Graph 
    */ 
    public IGraph getGraph() { 
    return graphControl.getGraph(); 
    } 

} 

감사 감사 iambilloo

+0

xml 파일을 게시 할 수 있습니까? 문제는 당신이 당신의 커스텀 뷰에 잘못된 디렉터를 사용하는 것처럼 보입니다.'원인 : android.view.InflateException : 바이너리 XML 파일 라인 # 8 : com.yworks.yfiles.ui.GraphControl 클래스를 부 풀리는 중 에러가 발생했습니다. –

답변

0

"libs와"라는 이름의 앱 디렉토리에 폴더를 만들고 거기에 외부 항아리를 넣어. eclipse에서 Java Build Path를 수정 한 다음 앱을 다시 빌드 (clean + build)하십시오! 이런 식으로 비슷한 문제가 발생했습니다.

+0

대답을 얻었지만, libs. 필요한 .jar를 복사하고 eclipse을 실행하면 힙 공간으로 인해 응답하지 않고 중단됩니다. 나는 무엇을해야합니까 ?????? – BilalArshad

+0

dex : Java 힙 공간을 실행할 수 없습니다. Java 힙 공간 – BilalArshad

+0

보기 [link] (http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F) –

관련 문제