Skip to content
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

copile problem Task :app:compileReleaseJavaWithJavac #726

Closed
zoranmil opened this issue May 2, 2021 · 3 comments
Closed

copile problem Task :app:compileReleaseJavaWithJavac #726

zoranmil opened this issue May 2, 2021 · 3 comments

Comments

@zoranmil
Copy link

zoranmil commented May 2, 2021

Bug Report

Problem

on android
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

What is expected to happen?

plugins
"prepare_queue": {
"installed": [],
"uninstalled": []
},
"config_munge": {
"files": {}
},
"installed_plugins": {
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+",
"PACKAGE_NAME": "com.nav.navidiku"
},
"cordova-plugin-file": {
"PACKAGE_NAME": "com.nav.navidiku"
},
"cordova-plugin-splashscreen": {
"PACKAGE_NAME": "com.nav.navidiku"
},
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.nav.navidiku"
},
"es6-promise-plugin": {
"PACKAGE_NAME": "com.nav.navidiku"
}
},
"dependent_plugins": {}
}

What does actually happen?

Information

Command or Code

build realise apc

Environment, Platform, Device

Windows android studio

Version information

Checklist

  • [] I searched for existing GitHub issues
  • [] I updated all Cordova tooling to most recent version
  • [] I included all the necessary information above
@jcesarmobile
Copy link
Member

Can you provide the actual error?
That only means Java failed to compile, but should also say why and that’s the important part.

@WilcoVertegaal
Copy link

I think I ran into this issue, so I'll provide the error messages:

`line 40: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;

line 303: error: cannot find symbol
this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),`

and that error line on line 801.

I think it is related to Android 4 being deprecated in Cordova Android 10 - if I understood all of this correctly?

@jcesarmobile
Copy link
Member

That error is because you are using AndroidX dependencies and the plugin doesn't support AndroidX yet (because cordova-android wasn't using it by default neither)
Now that cordova-android 10 is out with AndroidX enabled, it will be fixed in #751

Also, as workaround, you can use tools such as jetifier, or cordova-plugin-androidx-adapter or similar tooling that patches the plugins to use AndroidX

Closing since the issue creator didn't provide any information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants