Open arinze1008 opened 6 years ago
This plugin is now updated to 1.5.2
and I tested passed in Nexus 5
Its sill not working on version 1.5.2
What phone model do you use?
In addition, you can try to use adb
to get more debug info.
Thank you Vaenow. It is not working for me now. However when I tested it on Saturday it seemed to have worked.
My phone model is Samsung Duos,
and it is running android 5.0.2
.
I also tested it on Nexus Emulator
and it runs android 7.0
1
This plugin works good in Nexus 5
android 6.0
I suggest you use a new workspace to retest this plugin or use adb logcat
We have the same problem.
Ours is also an ionic 2 app, it builds fine locally from visual studio code or web storm. but the build is flawed once it goes thru our build pipeline, signed etc.
it does not work on either: Pixel 2 Samsung S7
LogCat Error:
01-29 11:32:41.019: E/AndroidRuntime(32341): java.lang.RuntimeException: Unable to get provider com.vaenow.appupdate.android.GenericFileProvider: java.lang.ClassNotFoundException: Didn't find class "com.vaenow.appupdate.android.GenericFileProvider" on path: DexPathList[[zip file "/data/app/dev.dt.buyonic-0wIZ-ocXJDVePwsPQm_OiQ==/base.apk"],nativeLibraryDirectories=[/data/app/dev.dt.buyonic-0wIZ-ocXJDVePwsPQm_OiQ==/lib/arm64, /system/lib64]]
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.installProvider(ActivityThread.java:6242)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.-wrap1(Unknown Source:0)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.os.Handler.dispatchMessage(Handler.java:106)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.os.Looper.loop(Looper.java:164)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.main(ActivityThread.java:6494)
01-29 11:32:41.019: E/AndroidRuntime(32341): at java.lang.reflect.Method.invoke(Native Method)
01-29 11:32:41.019: E/AndroidRuntime(32341): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
01-29 11:32:41.019: E/AndroidRuntime(32341): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-29 11:32:41.019: E/AndroidRuntime(32341): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.vaenow.appupdate.android.GenericFileProvider" on path: DexPathList[[zip file "/data/app/dev.dt.buyonic-0wIZ-ocXJDVePwsPQm_OiQ==/base.apk"],nativeLibraryDirectories=[/data/app/dev.dt.buyonic-0wIZ-ocXJDVePwsPQm_OiQ==/lib/arm64, /system/lib64]]
01-29 11:32:41.019: E/AndroidRuntime(32341): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-29 11:32:41.019: E/AndroidRuntime(32341): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-29 11:32:41.019: E/AndroidRuntime(32341): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-29 11:32:41.019: E/AndroidRuntime(32341): at android.app.ActivityThread.installProvider(ActivityThread.java:6227)
01-29 11:32:41.019: E/AndroidRuntime(32341): ... 10 more
I guess this issue is caused by the PR Prevent INSTALL_FAILED_CONFLICTING_PROVIDER error
@ian-beer, did you tried to reinstall the plugin, and / or remove and re-add android support ?
@arthursp @ian-beer - We were able to solve the 'Unable to get provider com.vaenow.appupdate.android.GenericFileProvider' error by removing cordova-android 7.0.0 and adding cordova-android 6.4.0. This plugin is broken on cordova-android 7.0.0 for our project.
@ian-beer @egrendonDev My solution is move the folder in android/src/com/vaenow to android/app/src/main/java/com. I think it's wrong when installing plugin. cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0 ios 4.3.1
I am currently on : "cordova-android": "6.3.0" So @egrendonDev , I think you are right.
Thanks for your feedback, I've already updated the install requirement
This plugin is not working on the both android versions 7.0.0 and 6.4.0. Please solve this issue. Thanks.
@fxp528 I moved the folder as you mentioned and it did fix my problem. Thank you.
@egrendonDev Your method is effective!
@fxp528
Man, i was struggled with this problems for several hours, you have solved my problem. I was about to give up.
Thank you very much
@fxp528 Thanks for saving my time. This works fine
@fxp528 Now app build perfectly. I put update.xml file and new version apk in a server. Old app version detected it and gave a alert that "This app has a new version. Need to be updated." And I press update button.
Then it show an alert "Updating, Update in background." It took more than 15 mins but app still appear same. And "Updating, Update in background." alert is still present. How to solve this? Any idea?
When I call http://www.*****.lk/apk/myapk.apk
in the browser it says The requested document was not found on this server. But when I call to a html doc in the same folder it shows.
This is my update.xml file
<update>
<version>2</version>
<name>myapk</name>
<url>http://www.*****.lk/apk/myapk.apk</url>
</update>
@gunarathnemdd Sorry, It's too little information to judge. Make sure you can download new apk via browser. And use adb to get more debug info.
Recommended use "cordova-android": "6.3.0", if you want to use this plugin correctly.
Moving the folder to other is strange, Because the line <source-file src="src/android" target-dir="src/com/vaenow/appupdate"/>
in plugin.xml show the folder where is this.
But moving the folder is ok for me in "cordova-android": "7.0.0".
@fxp528 I think there is not a version problem. Because my app is now working without stopped. I think server is not giving access to download the apk. As I updated my previous question, I can't download it through browser.
@gunarathnemdd It seems like the problem is caused by your server. You need to check your server can serve static file. It's not the plugin issue.
@fxp528
Thanks for the help. I added MIME-type: application/vnd.android.package-archive
to web.config file. Then it is works fine.
@fxp528 Just FYI, this issue is still happening on the latest install of ionic. I had to copy the sources to get the app to run correctly.
@johanvdb Copy the source to where?
From android/src/com/vaenow to android/app/src/main/java/com as mentioned above.
Any news about when this plugin will work out of the box with Cordova Android 7.0+? We cannot go back to 6.3.x because of other constraints.
I use the following tasks in my ionic project's package.json file (cordova 7.0). They copy the folders when running or building the project. I'm using copyfiles to copy the folder.
"move-files": "copyfiles -u 4 \"./platforms/android/src/com/vaenow/**\" \"platforms/android/app/src/main/java/com\"",
"ionic:watch:before": "npm run move-files",
"ionic:build:before": "npm run move-files",
Hope it helps ;)
I use the following tasks in my ionic project's package.json file (cordova 7.0). They copy the folders when running or building the project. I'm using copyfiles to copy the folder.
"move-files": "copyfiles -u 4 \"./platforms/android/src/com/vaenow/**\" \"platforms/android/app/src/main/java/com\"", "ionic:watch:before": "npm run move-files", "ionic:build:before": "npm run move-files",
Hope it helps ;)
Hi @EcoFreak ! Where did you put this code ?
@ian-beer @egrendonDev My solution is move the folder in android/src/com/vaenow to android/app/src/main/java/com. I think it's wrong when installing plugin. cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0 ios 4.3.1
remore cordova-plugin-firebase and reinstall
The new version of cordova-plugin-app-update throws an error
Then when I install cordova-plugin-app-update, and nothing else
ionic cordova plugin add cordova-plugin-app-update npm install --save @ionic-native/app-update
Myapp throws an error
This is the result of my ionic info
global packages:
local packages:
System:
Thanks