1

この度はお立ち寄りいただき、誠にありがとうございます。

Android 用アプリにツール クラッシュを実装しています。プラグインのクラッシュに必要なツールを追加するまで、これは適切に機能しました。この場合、phonegap (Cordova) を使用した Android アプリの crittercism です。

現在、アプリは起動せず、Lo​​gCat に次のメッセージが表示されます。

    07-22 10:42:34.710: W/dalvikvm(8296): VFY: unable to resolve static method 512: Landroid/webkit/WebView;.setWebContentsDebuggingEnabled (Z)V
07-22 10:42:34.770: W/System.err(8296): java.lang.ClassNotFoundException: org.apache.cordova.whitelist.WhitelistPlugin
07-22 10:42:34.770: W/System.err(8296):     at java.lang.Class.classForName(Native Method)
07-22 10:42:34.770: W/System.err(8296):     at java.lang.Class.forName(Class.java:217)
07-22 10:42:34.770: W/System.err(8296):     at java.lang.Class.forName(Class.java:172)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:345)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:189)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:114)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.PluginManager.init(PluginManager.java:92)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:383)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:368)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:344)
07-22 10:42:34.770: W/System.err(8296):     at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:389)
07-22 10:42:34.770: W/System.err(8296):     at com.example.android.CordovaApp.onCreate(CordovaApp.java:34)
07-22 10:42:34.770: W/System.err(8296):     at android.app.Activity.performCreate(Activity.java:5104)
07-22 10:42:34.770: W/System.err(8296):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
07-22 10:42:34.770: W/System.err(8296):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
07-22 10:42:34.770: W/System.err(8296):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
07-22 10:42:34.770: W/System.err(8296):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-22 10:42:34.770: W/System.err(8296):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
07-22 10:42:34.770: W/System.err(8296):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-22 10:42:34.770: W/System.err(8296):     at android.os.Looper.loop(Looper.java:137)
07-22 10:42:34.770: W/System.err(8296):     at android.app.ActivityThread.main(ActivityThread.java:5041)
07-22 10:42:34.770: W/System.err(8296):     at java.lang.reflect.Method.invokeNative(Native Method)
07-22 10:42:34.770: W/System.err(8296):     at java.lang.reflect.Method.invoke(Method.java:511)
07-22 10:42:34.770: W/System.err(8296):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
07-22 10:42:34.770: W/System.err(8296):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
07-22 10:42:34.770: W/System.err(8296):     at dalvik.system.NativeStart.main(Native Method)
07-22 10:42:34.770: W/System.err(8296): Caused by: java.lang.NoClassDefFoundError: org/apache/cordova/whitelist/WhitelistPlugin
07-22 10:42:34.780: W/System.err(8296):     ... 26 more
07-22 10:42:34.780: W/System.err(8296): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.cordova.whitelist.WhitelistPlugin" on path: /data/app/com.example.android-1.apk
07-22 10:42:34.780: W/System.err(8296):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
07-22 10:42:34.780: W/System.err(8296):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-22 10:42:34.780: W/System.err(8296):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-22 10:42:34.780: W/System.err(8296):     ... 26 more
07-22 10:42:34.780: W/dalvikvm(8296): threadid=1: thread exiting with uncaught exception (group=0x416da930)
07-22 10:42:34.780: E/AndroidRuntime(8296): FATAL EXCEPTION: main
07-22 10:42:34.780: E/AndroidRuntime(8296): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android/com.example.android.CordovaApp}: java.lang.NullPointerException
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.os.Looper.loop(Looper.java:137)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread.main(ActivityThread.java:5041)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at java.lang.reflect.Method.invokeNative(Native Method)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at java.lang.reflect.Method.invoke(Method.java:511)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at dalvik.system.NativeStart.main(Native Method)
07-22 10:42:34.780: E/AndroidRuntime(8296): Caused by: java.lang.NullPointerException
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:191)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:114)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.PluginManager.init(PluginManager.java:92)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:383)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:368)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:344)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:389)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at com.example.android.CordovaApp.onCreate(CordovaApp.java:34)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.Activity.performCreate(Activity.java:5104)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
07-22 10:42:34.780: E/AndroidRuntime(8296):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
07-22 10:42:34.780: E/AndroidRuntime(8296):     ... 11 more

私のプログラムの主な流れは次のとおりです。

public class CordovaApp extends CordovaActivity{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        super.init();
        // Set by <content src="index.html" /> in config.xml
        loadUrl(launchUrl);
    }
}

助けてくれてどうもありがとう

よろしく

4

0 に答える 0