Closed BoFoPinttag closed 8 years ago
Thanks for your question!
The following line says it all:
java.lang.ClassCastException: im.delight.android.webview.AdvancedWebView cannot be cast to com.pinttag.pinttag.AdvancedWebView
So it seems you have a class named AdvancedWebView
in your own package com.pinttag.pinttag
as well. Please remove that class if it's only a copy of the library, since you seem to have the copy in the correct package ´im.delight.android.webview` as well (or included the JAR).
Afterwards, you'll probably need to fix some imports.
I have so many issues with the openFileChooser because im using a webview so. I decided to use your AdvaneWebView and im having this problem with the cast of the webview. I would apreciate if you could help me with this issue. Thanks
ERROR:
7954-7954/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.pinttag.pinttag, PID: 7954 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pinttag.pinttag/com.pinttag.pinttag.MainActivity}: java.lang.ClassCastException: im.delight.android.webview.AdvancedWebView cannot be cast to com.pinttag.pinttag.AdvancedWebView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2790) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855) at android.app.ActivityThread.access$900(ActivityThread.java:181) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6117) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Caused by: java.lang.ClassCastException: im.delight.android.webview.AdvancedWebView cannot be cast to com.pinttag.pinttag.AdvancedWebView at com.pinttag.pinttag.MainActivity.onCreate(MainActivity.java:53) at android.app.Activity.performCreate(Activity.java:6374) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2743) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855) at android.app.ActivityThread.access$900(ActivityThread.java:181) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6117) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Main_Activity:
import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle;
public class MainActivity extends Activity implements AdvancedWebView.Listener {
}
LAYOUT
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="0dp" android:paddingRight="0dp" android:paddingTop="0dp" android:paddingBottom="0dp" tools:context=".MainActivity">