opened
bofe
username_0
The latest version of the android platform for Cordova, when used in combination with this plugin, makes an app to crash on startup.
Plugin makes app crash on startup using Cordova Android Platform 7.0.0
issue
created
greybax
username_1
@username_0 please specify which errors did you get
comment
created
bofe
username_0
Sorry, here's the logcat:

```
12-28 10:58:04.757 11968 11968 I CordovaLog: Changing log level to DEBUG(3)
12-28 10:58:04.757 11968 11968 I CordovaActivity: Apache Cordova native platform version 7.0.0 is starting
12-28 10:58:04.757 11968 11968 D CordovaActivity: CordovaActivity.onCreate()
12-28 10:58:04.761 11968 11968 D AndroidRuntime: Shutting down VM
--------- beginning of crash
12-28 10:58:04.766 11968 11968 E AndroidRuntime: FATAL EXCEPTION: main
12-28 10:58:04.766 11968 11968 E AndroidRuntime: Process: com.testapp.username_0, PID: 11968
12-28 10:58:04.766 11968 11968 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testapp.username_0/com.testapp.username_0.MainActivity}: java.lang.RuntimeException: Failed to create webview. 
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2426)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5443)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: Caused by: java.lang.RuntimeException: Failed to create webview. 
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at org.a.a.s.a(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at org.a.a.f.e(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at org.a.a.f.d(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at org.a.a.f.a(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at org.a.a.f.a(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at com.testapp.username_0.MainActivity.onCreate(Unknown Source)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6245)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	... 9 more
12-28 10:58:04.766 11968 11968 E AndroidRuntime: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, class org.a.a.o]
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at java.lang.Class.getConstructor(Class.java:528)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	at java.lang.Class.getConstructor(Class.java:492)
12-28 10:58:04.766 11968 11968 E AndroidRuntime: 	... 18 more
12-28 10:58:04.785  2261  4294 W ActivityManager:   Force finishing activity com.testapp.username_0/.MainActivity
```
comment
created
greybax
username_1
not sure that this is exception because of plugin. Nowhere mentioned about this plugin in logs..
comment
created
bofe
username_0
It's easy to reproduce. Create a new android project in Cordova (make sure it's the latest Cordova Android Platform, 7.0.0). 

Without the plugin, it runs perfectly.
Add the plugin, and it crashes on start.
comment
created
GuilleOr
username_2
Hey username_1.
Same thing happens to me!
comment
created
action7777
username_3
Confirming issues with your plugin and Cordova Android Platform 7. Without plugin app works perfectly, after installing plugin - black screen on app start, nothing in debug log.
Looks like some project structure paths changed in Cordova Android Platform 7 and this causing troubles.
comment
created
erkutalakus
username_4
same problem here!
comment
closed
greybax
username_1
issue
created
greybax
username_1
merged PR and bumped npm package to v2.0.0
comment