Closed trietbui85 closed 10 years ago
same problem here
Just add support library in gridlayout_v7, and the problem will be solved.
after adding also getting the same problem?????? pls send the working code to rajendhiran.mca@gmail.com
You proberbly just need to add that jar: https://github.com/jacobmoncur/gridlayout_v7/tree/master/libs
Were you able to get the sample code up and running? The setup of the project has to be very specific or it will not build. Let me know if you had any more issues.
dancefire is right, just add the Android Support library (android-support-v4.jar) to the libs-folder of the gridlayout_v7-master library project. Worked fine for me!
I got this exception when try to import and run your sample
01-20 10:17:46.351: E/AndroidRuntime(9934): FATAL EXCEPTION: main 01-20 10:17:46.351: E/AndroidRuntime(9934): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jake.quiltviewsample/com.jake.quiltviewsample.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class com.jake.quiltview.QuiltView 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2185) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2210) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread.access$600(ActivityThread.java:142) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.os.Handler.dispatchMessage(Handler.java:99) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.os.Looper.loop(Looper.java:137) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread.main(ActivityThread.java:4931) 01-20 10:17:46.351: E/AndroidRuntime(9934): at java.lang.reflect.Method.invokeNative(Native Method) 01-20 10:17:46.351: E/AndroidRuntime(9934): at java.lang.reflect.Method.invoke(Method.java:511) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558) 01-20 10:17:46.351: E/AndroidRuntime(9934): at dalvik.system.NativeStart.main(Native Method) 01-20 10:17:46.351: E/AndroidRuntime(9934): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.jake.quiltview.QuiltView 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.createView(LayoutInflater.java:613) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:275) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.Activity.setContentView(Activity.java:1867) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.jake.quiltviewsample.MainActivity.onCreate(MainActivity.java:19) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.Activity.performCreate(Activity.java:5008) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2139) 01-20 10:17:46.351: E/AndroidRuntime(9934): ... 11 more 01-20 10:17:46.351: E/AndroidRuntime(9934): Caused by: java.lang.reflect.InvocationTargetException 01-20 10:17:46.351: E/AndroidRuntime(9934): at java.lang.reflect.Constructor.constructNative(Native Method) 01-20 10:17:46.351: E/AndroidRuntime(9934): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.view.LayoutInflater.createView(LayoutInflater.java:587) 01-20 10:17:46.351: E/AndroidRuntime(9934): ... 22 more 01-20 10:17:46.351: E/AndroidRuntime(9934): Caused by: java.lang.NoClassDefFoundError: android.support.v7.gridlayout.R$dimen 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.support.v7.widget.GridLayout.<init>(GridLayout.java:255) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.support.v7.widget.GridLayout.<init>(GridLayout.java:274) 01-20 10:17:46.351: E/AndroidRuntime(9934): at android.support.v7.widget.GridLayout.<init>(GridLayout.java:282) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.jake.quiltview.QuiltViewBase.<init>(QuiltViewBase.java:26) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.jake.quiltview.QuiltView.setup(QuiltView.java:62) 01-20 10:17:46.351: E/AndroidRuntime(9934): at com.jake.quiltview.QuiltView.<init>(QuiltView.java:51) 01-20 10:17:46.351: E/AndroidRuntime(9934): ... 25 more
Can you please provide a runnable APK so that I can enjoy QuiltView UI.