Comments (17)
I think I found a solution to my problem. I will explain it in english, because, you know, we are on the internet and we need to understand each other: you just need to install a plugin which will add a "android.support.v4.jar" which seems to be needed for this plugin. I found a plugin which does that: https://www.npmjs.com/package/cordova-plugin-android-support-v4
A simple "cordova plugin add cordova-plugin-android-support-v4 " will do the trick.
from cordova-plugin-app-update.
platforms/android/project.properties 文件中加入
cordova.system.library.1=com.android.support:support-v4:+
cordova.system.library.2=com.android.support:support-v4:24.1.1+
然后编译就可以了
from cordova-plugin-app-update.
Congratulations for your success build. ⛳
Another way:
you can put this file android-support-v4.jar
into directory: xxxxx/platforms/android/libs/
from cordova-plugin-app-update.
https://cordova.apache.org/docs/en/6.x/plugin_ref/spec.html#framework
-
update ur android support repository(or library)
like ...
http://startandroid.ru/images/stories/lessons/L0114/L0114_010.JPG
add below to plugin.xml
<platform name="android">
...
<framework src="com.android.support:support-v4:+" />
...
</platform>
from cordova-plugin-app-update.
是不是缺少这个包? android-support-v4.jar
请把具体的日志信息贴出来。
from cordova-plugin-app-update.
I think I have the same problem. The plugin does not compile, I have an error which is:
D:\xxxxxxx\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:6: error: package android.support.v4.app does not exist
When I launch "cordova run android". It looks like you are talking about a package that I am lacking.
from cordova-plugin-app-update.
config.xml add <framework
src="com.android.support:support-v4:23.3.0+" />``
from cordova-plugin-app-update.
Hi, after adding cordova plugin add cordova-plugin-android-support-v4 the problem is still exist and when trying to build get following
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
F:\projects\phonegap\test\intexcom\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:52: error: cannot find symbol
int permission = ActivityCompat.checkSelfPermission(activity,
^
symbol: method checkSelfPermission(Activity,String)
location: class ActivityCompat
my cordova version is 6.4.0
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-14,android-16,android-17,android-18,android-19,android-20,android-21,android-23,android-24,Google Inc.:Google APIs:16,Google Inc.:Google APIs:17,Google Inc.:Google APIs:18,Google Inc.:Google APIs:19,Google Inc.:Google APIs:21,Google Inc.:Google APIs:23
Gradle: installed
<engine name="android" spec="~6.0.0" />
<framework src="com.android.support:support-v4:23.3.0+" />
<plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
<plugin name="cordova-plugin-android-support-v4" spec="~21.0.1" />
<plugin name="cordova-plugin-app-update" spec="~1.3.9" />
adding <framework src="com.android.support:support-v4:23.3.0+" /> to config.xml didnt help me
from cordova-plugin-app-update.
Resolved, problem that https://www.npmjs.com/package/cordova-plugin-android-support-v4 doesnt help after installing it, I change android-support-v4.jar at platform/android/lib to file from %ANDROID_PATH%/extras/android/support/v4 and now it works
PS: I have not seen folder extras/android/support/v4 before cause i did'nt install Android Support Library at Android SDK Manager, for now it Obsollete for SDK and to show it at Extra folder need mark Obsolete checkbox under Show label . For more details look at http://startandroid.ru/images/stories/lessons/L0114/L0114_010.JPG
from cordova-plugin-app-update.
@mideon Good job 😄 👍
from cordova-plugin-app-update.
I think getting same error in here,
how to fix this?
Error: cmd: Command failed with exit code 1 Error output:
C:\Users\.......\Myproject\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:6: error: package android.support.v4.app does not exist
import android.support.v4.app.ActivityCompat;
^
C:\Users\.......\Myproject\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:52: error: cannot find symbol
int permission = ActivityCompat.checkSelfPermission(activity,
^
symbol: variable ActivityCompat
location: class CheckAppUpdate
C:\Users\.......\Myproject\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:57: error: cannot find symbol
ActivityCompat.requestPermissions(activity, PERMISSIONS_STORAGE,
^
symbol: variable ActivityCompat
location: class CheckAppUpdate
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
from cordova-plugin-app-update.
@badaay this issue maybe relate to the Pull #16
from cordova-plugin-app-update.
@vaenow i think , in my case this plugin still not working in android 6.x and later
from cordova-plugin-app-update.
Please this problem is still there. Even after following all the instructions in this thread. the folder path %ANDROID_PATH%/extras/android/support/v4 no longer available. Any solution please
from cordova-plugin-app-update.
For me adding the plugin that @twothirdsFR mentioned worked too (plugin "cordova-plugin-android-support-v4").
As I'm working with Ionic v3.7.1 and following the patterns, I can't make what @hhafeng mentioned because that file will not be tracked by version control system (Although I tried and that worked).
from cordova-plugin-app-update.
I posted my problem above some days ago... Tried and resolved this by removing the android platform, then deleting everything from "..\node_modules", then deleting everything from "..\plugins" then cleaned "config.xml" and "package.json" of my project leaving only the plugins I needed, removed "cordova-plugin-android-support-v4" and leaved "cordova-plugin-local-notification" only. Then I executed "npm install", "ionic cordova platform add android" and the build works.
People, I need help to solve this problem on an Ionic project that I tried but could not solve it alone.
When I build it I receive the following messages:
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
^
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:130: error: cannot find symbol
.setChannelId(options.getChannel())
^
symbol: method setChannelId(String)
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:296: error: cannot find symbol
MediaStyle style;
^
symbol: class MediaStyle
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:298: error: cannot find symbol
style = new MediaStyle(builder)
^
symbol: class MediaStyle
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:417: error: constructor Builder in class Builder cannot be applied to given types;
builder = new NotificationCompat.Builder(context, options.getChannel());
^
required: Context
found: Context,String
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
:compileDebugJavaWithJavac FAILED
BUILD FAILED
Total time: 1 mins 6.871 secs
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
^
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:130: error: cannot find symbol
.setChannelId(options.getChannel())
^
symbol: method setChannelId(String)
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:296: error: cannot find symbol
MediaStyle style;
^
symbol: class MediaStyle
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:298: error: cannot find symbol
style = new MediaStyle(builder)
^
symbol: class MediaStyle
location: class Builder
C:\Dev_Tortoise\AppBarigui\platforms\android\src\de\appplant\cordova\plugin\notification\Builder.java:417: error: constructor Builder in class Builder cannot be applied to given types;
builder = new NotificationCompat.Builder(context, options.getChannel());
^
required: Context
found: Context,String
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
FAILURE: Build failed with an exception.
I tried to add to <config.xml>
<plugin name="cordova-plugin-android-support-v4" spec="21.0.1" />
Tried to add in the package.json:
"dependencies": {
"cordova-plugin-android-support-v4": "21.0.1",
...
},
...
"cordova": {
"plugins": {
"cordova-plugin-android-support-v4": {},
...
}
}
Tried to remove android platform, added again.
Someone can help with the problem? Tell me if I need to remove something from config.xml or package.json... or if I need to add something else... I'm kinda beginner, so please tell step by step... Thanks!!
I'm using:
cli packages: (C:\Users\cristopherl\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.7
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
from cordova-plugin-app-update.
same problem with Cordova 7.0.1, I've tried installed 'cordova-plugin-android-support-v4', remove and re-add platform android, and still got build problem:
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
D:\Cordova\cdvupdate\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:52: 锟斤拷锟斤拷: 锟揭诧拷锟斤拷锟斤拷锟斤拷
int permission = ActivityCompat.checkSelfPermission(activity,
^
锟斤拷锟斤拷: 锟斤拷锟斤拷 checkSelfPermission(Activity,String)
位锟斤拷: 锟斤拷 ActivityCompat
D:\Cordova\cdvupdate\platforms\android\src\com\vaenow\appupdate\android\CheckAppUpdate.java:57: 锟斤拷锟斤拷: 锟揭诧拷锟斤拷锟斤拷锟斤拷
ActivityCompat.requestPermissions(activity, PERMISSIONS_STORAGE,
^
锟斤拷锟斤拷: 锟斤拷锟斤拷 requestPermissions(Activity,String[],int)
位锟斤拷: 锟斤拷 ActivityCompat
2 锟斤拷锟斤拷锟斤拷
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
from cordova-plugin-app-update.
Related Issues (20)
- my app continuosly ask for "upadate available even though is updated once in ionic 3" HOT 5
- Download Bar doesn't fill up for when downloading APK HOT 4
- CheckAppUpdate.java uses or overrides a deprecated API.
- There was a problem while parsing the package
- App Not installing automatically in android 9 HOT 8
- Download Again / Install Manually when run with the Kiosk cordova plugin HOT 4
- App crashed after download HOT 4
- Provide full api expose
- Receiving only one message from plugin
- APK Update
- Implementation with ionic-stencil
- I don't think the plugin still has active maintainers. Here's an alternative. HOT 3
- When I open the application, I got an error in console that says: HOT 2
- Don't use this plugin! HOT 10
- This plugin is a voilation against google policies, do not install this plugin HOT 2
- Does this plugin support android10? HOT 2
- Application crash while trying to update (null.appupdate.provider)
- Do you possibly support capacitor?
- FileNotFoundException
- BSF Cordova Ecosystem Crowdfunding Plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-app-update.