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