Cordova-plugin-firebasex: Can't build with cordova-plugin-camera plugin

Created on 12 Jul 2019  Â·  10Comments  Â·  Source: dpa99c/cordova-plugin-firebasex

Describe the bug
A clear and concise description of what the bug is.
i'm using both firebasex and [email protected] plugin.. it shows following error


Task :app:createDebugCompatibleScreenManifests

Task :app:processDebugManifest
E:xampp\htdocs\dd\platforms\android\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present

Task :app:fabricGenerateResourcesDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:mergeDebugResources
Task :app:processDebugResources

Task :app:compileDebugJavaWithJavac FAILED
33 actionable tasks: 10 executed, 23 up-to-date
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:40: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCordovaUri.java:25: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
E:xampp\htdocs\dd\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 {}
^
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:303: error: cannot find symbol
this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: method getUriForFile(Activity,String,File)
location: class FileProvider
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:801: 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.
5 errors

FAILURE: Build 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s
E:xampp\htdocs\dd\platforms\android\gradlew: Command failed with exit code 1 Error output:
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:40: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCordovaUri.java:25: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
E:xampp\htdocs\dd\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 {}
^
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:303: error: cannot find symbol
this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: method getUriForFile(Activity,String,File)
location: class FileProvider
E:xampp\htdocs\dd\platforms\android\app\src\main\java\org\apache\cordova\cameraCameraLauncher.java:801: 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.
5 errors

FAILURE: Build 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s

android [email protected]
cordova [email protected]
android studio [email protected]

support

Most helpful comment

The same cause as #29 - cordova-plugin-camera references the legacy Android Support Library so you need to add cordova-plugin-androidx-adapter to your project to patch it:

cordova plugin add cordova-plugin-androidx-adapter

Thanks a lot man.. It works great...

All 10 comments

The same cause as #29 - cordova-plugin-camera references the legacy Android Support Library so you need to add cordova-plugin-androidx-adapter to your project to patch it:

cordova plugin add cordova-plugin-androidx-adapter

The same cause as #29 - cordova-plugin-camera references the legacy Android Support Library so you need to add cordova-plugin-androidx-adapter to your project to patch it:

cordova plugin add cordova-plugin-androidx-adapter

Thanks a lot man.. It works great...

I installed cordova-plugin-androidx-adapter, but I still got android build error: error: package android.support.v4.content does not exist. Any ideas?

I installed cordova-plugin-androidx-adapter, but I still got android build error: error: package android.support.v4.content does not exist. Any ideas?

whats your android platform version?

cordova -v
8.0.0

cordova platform ls
Installed platforms:
android 8.0.0

On Wednesday, July 31, 2019, 02:50:52 AM EDT, dassram17 <[email protected]> wrote:

I installed cordova-plugin-androidx-adapter, but I still got android build error: error: package android.support.v4.content does not exist. Any ideas?

whats your android platform version?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I opened a new issue in #69

cordova-plugin-androidx-adapter is a dependency, so if its not added it means that there is some error (like for instance missing deps, it uses couple npm modules like recursive-readdir, xml-js, performance-now, ...)

check the logs

The same cause as #29 - cordova-plugin-camera references the legacy Android Support Library so you need to add cordova-plugin-androidx-adapter to your project to patch it:

cordova plugin add cordova-plugin-androidx-adapter

Thanks a lot!! saved my day!

Thaks a lot guys

The same cause as #29 - cordova-plugin-camera references the legacy Android Support Library so you need to add cordova-plugin-androidx-adapter to your project to patch it:

cordova plugin add cordova-plugin-androidx-adapter

This resolved the issue completely. Thank you so much.

Was this page helpful?
0 / 5 - 0 ratings