Closed CS-Tao closed 5 years ago
Hi @CS-Tao, help me reproduce this please:
Can I just check out the develop
branch of your app at https://github.com/CS-Tao/whu-library-seat-mobile/tree/develop and then install with cordova-android 7.1.2 to get a working app and then change to 7.1.3 to see that it does not work any more?
@janpio Yes, please. Many thanks!
I have tried to upgrade build-tools version from 26.0.2 to 28.0.3, but it still can not work.
Why do you think this could be related and help?
@CS-Tao What exactly do you mean by "flash back unexpectedly"?
@janpio I'm not sure. And just have a try, because I found that build-tools version has been changed in ".travis.yml" of this repo in v7.1.3.
@CS-Tao What exactly do you mean by "flash back unexpectedly"?
Just I can't open my app, it exited when I try to open it.
Ok, I could reproduce your problem:
index.html
in www
. How can I build the actual web app in www
so I can confirm that 7.1.2 really works?
Update: node build/build.js
seems to do the trick. Waiting for it to finish now.
Ok, I can confirm that your app built with 7.1.2 works and intended, but crashes on startup with "Unfortunately, whu-library-seat-mobile has stopped." when built with 7.1.3. This looks like a bug to me - we will investigate.
Ok, I could reproduce your problem:
- 7.1.3: "Unfortunately, whu-library-seat-mobile has stopped."
- 7.1.2: starts, but then crashes because no
index.html
inwww
.How can I build the actual web app in
www
so I can confirm that 7.1.2 really works?
run yarn build
before yarn release:android
like scripts in .travis.yml
I am using npm
locally, but executing node build/build.js
built a www
that could be shown on the device.
Just to make sure this is not a general problem:
A new project created with cordova create
and then cordova platform add android@7.1.3
can be built and started just fine - so this is not a general problem of cordova-android 7.1.3 but something with your app (setup, plugins, ...). We will continue to investigate.
Okay. Thank you~
I used adb logcat
(h/t @oliversalzburg) to monitor the log output of the device, got this on app start:
11-22 11:52:17.703 11103 11103 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider de.appplant.cordova.plugin.notification.util.AssetProvider: java.lang.ClassNotFoundException: Didn't find class "de.appplant.cordova.plugin.notification.util.AssetProvider" on path: DexPathList[[zip file "/data/app/cc.cs_tao.whu_library_seat_mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.cs_tao.whu_library_seat_mobile-1/lib/arm, /vendor/lib, /system/lib]]
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.-wrap1(ActivityThread.java)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "de.appplant.cordova.plugin.notification.util.AssetProvider" on path: DexPathList[[zip file "/data/app/cc.cs_tao.whu_library_seat_mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.cs_tao.whu_library_seat_mobile-1/lib/arm, /vendor/lib, /system/lib]]
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5141)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: ... 10 more
11-22 11:52:17.703 11103 11103 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: de.appplant.cordova.plugin.notification.util.AssetProvider
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.Class.classForName(Native Method)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: ... 12 more
11-22 11:52:17.703 11103 11103 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
11-22 11:52:17.704 1910 3271 W ActivityManager: Force finishing activity cc.cs_tao.whu_library_seat_mobile/.MainActivity
Removing the plugin fixed the crash.
You were using a beta version of this plugin anyway:
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
Try upgrading to the available beta3 or downgrade to an older, stable version.
If upgrading to beta does not help, please report the problem at the plugin's repository issues, I didn't see an existing one on a first look.
If using the newer version of the plugin doesn't work, please also report back here - maybe this is indeed caused by 7.1.3. Someone else from the team will look into this then.
Further investigation showed that this is indeed a problem of cordov-androida. The plugin files are copied to different places in 7.1.3 than they were in 7.1.2, which causes the plugin to crash. In your case it was cordova-plugin-local-notifications
, but it could theoretically affect lots of other plugins as well.
We will continue investigating and provide a fix asap. Until then: Best stay with 7.1.2 @CS-Tao .
Closing in favour of https://github.com/apache/cordova-android/issues/571 as it contains the key problem. But thanks for reporting and being so cooperative!
7.1.4 patch release is now published to resolve the issue.
My app was built successfully by Travis-ci, but it flash back unexpectedly when launch. It works yesterday when built with v7.1.2. Does anybody know what caused this?
I have tried to upgrade build-tools version from 26.0.2 to 28.0.3, but it still can not work.
Files:
Travis-ci build logs (For same commit)