You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/12/16 09:10:05 UTC

[GitHub] [cordova-plugin-camera] theparitt opened a new issue #697: Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

theparitt opened a new issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   I cannot run cordova 
   
   
   ### What does actually happen?
   Task :app:mergeDebugJavaResource FAILED
   I tried to enable adnroidx but the error is still 
   
   ## Information
   > Task :app:compileDebugJavaWithJavac FAILED
   C:\Users\I-w-I\Dropbox\mobile\mormit\platforms\android\app\src\main\java\org\apache\cordova\camera\CameraLauncher.java:42: error: package android.support.v4.content does not exist
   import android.support.v4.content.FileProvider;
                                    ^
   C:\Users\I-w-I\Dropbox\mobile\mormit\platforms\android\app\src\main\java\org\apache\cordova\camera\FileProvider.java:21: error: package android.support.v4.content does not exist
   public class FileProvider extends android.support.v4.content.FileProvider {}
                                                               ^
   C:\Users\I-w-I\Dropbox\mobile\mormit\platforms\android\app\src\main\java\org\apache\cordova\camera\CameraLauncher.java:296: error: cannot find symbol
           this.imageUri = FileProvider.getUriForFile(cordova.getActivity(),
                                       ^
     symbol:   method getUriForFile(Activity,String,File)
     location: class FileProvider
   C:\Users\I-w-I\Dropbox\mobile\mormit\platforms\android\app\src\main\java\org\apache\cordova\camera\CameraLauncher.java:823: error: cannot find symbol
                           Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
                                                     ^
     symbol:   method getUriForFile(Activity,String,File)
     location: class FileProvider
   Note: Some input files use or override a deprecated API.
   Note: Recompile with -Xlint:deprecation for details.
   Note: C:\Users\I-w-I\Dropbox\mobile\mormit\platforms\android\app\src\main\java\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.    
   Note: Recompile with -Xlint:unchecked for details.
   4 errors
   
   > Task :app:mergeDebugJavaResource FAILED
   
   FAILURE: Build completed with 2 failures.
   
   1: Task failed with an exception.
   -----------
   * What went wrong:
   Execution failed for task ':app: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. Run with --scan to get full insights.
   ==============================================================================
   
   2: Task failed with an exception.
   -----------
   * What went wrong:
   Execution failed for task ':app:mergeDebugJavaResource'.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > com.google.common.base.VerifyException (no error message)
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] theparitt edited a comment on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
theparitt edited a comment on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-747408413


   I don't mind to use the old library since all other codes are based on the old Android library too. 
   
   I think some parts of cordova-camera-plugin uses the android x, doesn't it?  because when I compile the code, the compile r says like cannot find "`android.support.v4.content.FileProvider`"
   
   How could I fix this problem. I am now using Cordova 9.. Windows 10 64-bit. I use androidx-plugin. I can solve this  android.support.v4.content.FileProvider but I ran into other problems instead.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] breautek commented on issue #697: Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-746249484


   This plugin does not support androidx because it's using the old android support libraries.
   
   You may have luck by installing the [cordova-plugin-androidx-adapter](https://www.npmjs.com/package/cordova-plugin-androidx-adapter) which does it's best to "upgrade" plugins that is using the old support libraries into the equivalent androidx libraries.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] breautek commented on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-747498682


   @theparitt  I may have incorrectly assume that you have AndroidX enabled. Can you confirm that you do? The mentioned errors is usually a side effect of having AndroidX enabled and trying to use plugins that uses the old support libraries, hence my assumption.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] breautek edited a comment on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-746249484


   This plugin does not support androidx because it's using the old android support libraries.
   
   You may have luck by installing the [cordova-plugin-androidx-adapter](https://www.npmjs.com/package/cordova-plugin-androidx-adapter) which does it's best to "upgrade" plugins that is using the old support libraries into the equivalent androidx libraries.
   
   I'll keep this issue open -- I think our next cordova-android major may drop support for the old support libraries. But I don't think that decision has been fully concluded yet.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] theparitt edited a comment on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
theparitt edited a comment on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-747408413


   I don't mind to use the old library since all other codes are based on the old Android library too. 
   
   I think some parts of cordova-camera-plugin uses the androidx, doesn't it?  because when I compile the code, the compiler says like cannot find "`android.support.v4.content.FileProvider`" 
   
   How could I fix this problem. I am now using Cordova 9.. Windows 10 64-bit. I use androidx-plugin. I can solve this  android.support.v4.content.FileProvider but I ran into other problems instead.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jcesarmobile commented on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-746456629


   closing as duplicate of https://github.com/apache/cordova-plugin-camera/issues/405


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jcesarmobile commented on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-747496555


   If `cordova-plugin-androidx-adapter` didn't work, try using [jetifier](https://www.npmjs.com/package/jetifier).
   
   The problem is you can't use non AndroidX libraries with AndroidX libraries, as long as one of your plugins uses AndroidX, you'll need to update/patch all.
   
   cordova-plugin-camera doesn't use AndroidX yet.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] theparitt commented on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
theparitt commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-747408413


   I don't mind to hse the old library since all other codes are based on the old Android library too. 
   
   I think some parts of cordova-camera-plugin uses the android x, doesn't it?  because when I compile the code, the compile r says like cannot find "android.support.v4.content.FileProvider"
   
   How could I fix this problem. I am now using Cordova 9.. Windows 10 64-bit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] Civile commented on issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
Civile commented on issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697#issuecomment-919268010


   > This plugin does not support androidx because it's using the old android support libraries.
   > 
   > You may have luck by installing the [cordova-plugin-androidx-adapter](https://www.npmjs.com/package/cordova-plugin-androidx-adapter) which does it's best to "upgrade" plugins that is using the old support libraries into the equivalent androidx libraries.
   > 
   > I'll keep this issue open -- I think our next cordova-android major may drop support for the old support libraries. But I don't think that decision has been fully concluded yet.
   
   Excellent solution, it works


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jcesarmobile closed issue #697: [AndroidX] Task :app:mergeDebugJavaResource FAILED when add plugin cordova-plugin-camera

Posted by GitBox <gi...@apache.org>.
jcesarmobile closed issue #697:
URL: https://github.com/apache/cordova-plugin-camera/issues/697


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org