Capacitor error when compiling Quasar project - android

I'm trying to build a Quasar project using capacitor, but I'm facing next issue while running quasar build -m capacitor -T android command:
> Task :app:compileReleaseJavaWithJavac FAILED
C:\Users\ProjectName\src-capacitor\android\app\src\main\java\org\capacitor\quasar\app\MainActivity.java:22: error: cannot find symbol
EnableHttpsSelfSigned.enable(this.bridge);
^
symbol: variable EnableHttpsSelfSigned
location: class MainActivity
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details
How can I solve this issue?

Related

Build failed because of react native reanimated 2

I install react native reanimated 2 according to its installation doc. But when I run project for android build, I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'lib/x86_64/libreactnativejni.so' from inputs:
- D:\ReactBootCamp_RASAHR\Bootcamp Main Projects\ReactNative\SecondVersion\Fooductor\node_modules\react-native-reanimated\android\build\.transforms\1ebd6d22f25011a79a18acd12f297fc9\transformed\jetified-react-native-reanimated-65-hermes\jni
- C:\Users\Kavosh\.gradle\caches\transforms-3\156e8e6ad84734ffd5fbff137e92dae0\transformed\jetified-react-native-0.65.1\jni
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
How can I solve this?

Some issues while running react-native run-android

I'm facing these issues the whole day - fixing one to face another one 🤦‍♂️
what's the issue here? - after executing this command
react-native run-android?
the full error :
Task :app:compileDebugJavaWithJavac FAILED
/Users/mohsen/Desktop/roam - copy/roam/roam/android/app/src/main/java/host/exp/exponent/MainApplication.java:39: error: cannot find symbol
return BuildVariantConstants.USE_INTERNET_KERNEL;
^
symbol: variable BuildVariantConstants
location: class MainApplication
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
There might be some problem in your MainApplication.java. Look for any syntax problem or any other issue you get there. After that you can open Android studio sync your project and see if you get any error there. Update build tools from there if necessary. Maybe it will be sorted by then.

Dex error when trying to build ionic Android app

I'm trying to build an ionic app for Android but when I run
ionic cordova run android
I get
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files
Trying to run ./gradlew clean gets me
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
I had the same issue but it was resolved. Thanks to information from #notlose at this link https://github.com/oney/react-native-gcm-android/issues/32
Solution:
just remove both 'build' folder in /android and /android/app
and build again with
'react-native run-android' for react-native
'ionic cordova run android' for ionic

Cordova GooglePlus plugin crashes build for android

I am using the cordova-plugin-googleplus for sign in with Google, and when trying to build I get:
Error: cmd: Command failed with exit code 1 Error output:
D:\..\project\platforms\android\src\nl\xservices\plugins\GooglePlus.java:151: error: cannot access AbstractSafeParcelable
.addApi(Auth.GOOGLE_SIGN_IN_API, gso.build());
^
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
I looked everywhere, and no solution worked for me.
Plugin version: 5.1.1
Cordova version: 7.0.1
I am already using compile "com.google.firebase:firebase-messaging:10.0.1" so the other issue thread is not a duplicate

Error when include path_provider

I get an error when I'm trying to compile path_provider:
/home/user/projects/flutterframework/TestApp/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java:15:
error: cannot find symbol
path_provider = PathProviderPlugin.register(activity);
symbol: method register(FlutterActivity)
location: class PathProviderPlugin
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
How can I fix it?
Lubuntu 16 LTS x64
It sounds like you have an old project template. You shouldn't have a PluginRegistry.java. Try flutter upgrade, recreate your project and copy the old project's dart files and assets over.

Categories

Resources