-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android build failed for cordova-plugin-file-opener2 giving Error - A plugin you are using requires a preference: ANDROID_SUPPORT_V4_VERSION #238
Comments
i have the same problem, any have a solution ? |
hi @umeshShindepatil, thanks for raising this issue. Looks like you're using Phonegap Build? My first recommendation would be to make sure you specify a particular version of the plugin so any future changes (to any of your plugins) don't cause you any problems in your project. e.g. Interesting that phonegap is requiring you to specify a value for ANDROID_SUPPORT_V4_VERSION. I thought this should be optional, but I don't know enough about phonegap build to understand why this is not the case. Try this fix in your config: <gap:plugin name="cordova-plugin-file-opener2" source="npm" spec="2.1.0">
<param name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</gap:plugin> You might find this documentation useful. http://docs.phonegap.com/phonegap-build/configuring/plugins/#plugin-params If that fixes your issue I'll update the README to help other users who see the same issue. |
I have this line in config.xml and dont work.
|
hi @fer1994 , how are you building your project? With phonegap build? Or just on the command line? |
I build in command line, thats is the problem. I cant change manually the build.gradle |
Hi @fer1994, if you could send me some more information about your project that would help me understand the issue you are having. Firstly can you show me the output of running this command in your project: cordova info and if you can also tell me what cordova command you are using when trying to build the app and the exact error that is being outputted that would be great. |
Yes y put here the cordova info. Node Version: 6.9.2 CONFIG.XML (I delete the headers)
|
Hi All, removed - <gap:plugin name="cordova-plugin-file-opener2" source="npm" /> thanks! |
@umeshShindepatil glad you solved your issue. @fer1994 can you send me a copy of the exact error you are getting. |
@fer1994 i believe I have found the root cause of the issue phonegap/phonegap-plugin-barcodescanner#616 (comment). Looks like Cordova 6 does not support the fix for the android support version build issue (#234). If you can, try upgrading your Cordova CLI to at least version 7 |
Hi, the exactly problem is this.
I dont use this plugin and i try update the cordova cli and the problem prevails |
hi @fer1994, the link to the issue was just a reference to what I believed the issue to be. Can you run |
|
@fer1994 try removing the If that doesn't work, downgrade to |
I update the GRADLE and it work! |
great! glad it's working now. |
Android build failed for cordova-plugin-file-opener2 giving Error - A plugin you are using requires a preference: ANDROID_SUPPORT_V4_VERSION
Hi
Getting error for android build - Error - A plugin you are using requires a preference: ANDROID_SUPPORT_V4_VERSION.
below code is in my config -
<gap:plugin name="cordova-plugin-file-opener2" source="npm">
plz help.
Thanks!
The text was updated successfully, but these errors were encountered: