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.
Related
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?
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.
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
I am getting the following error:
Error occurred while compiling the application after compiling appcompat_v7 library
This is the output:
Gradle: invalid resource directory name:
C:\Users\Alireza\Desktop\Android
app\TISAppProject\TISApp\build\res\all\debug/drawable-ldrtl-xxxhdpi
invalid resource directory name: C:\Users\Alireza\Desktop\Android
app\TISAppProject\TISApp\build\res\all\debug/drawable-xxxhdpi
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':TISApp:processDebugResources'.
Running C:\Program Files\Android\android-studio\sdk\build-tools\android-4.2.2\aapt.exe
failed. See output
How can I fix this?
I am running Android Studio v0.1.1 on Windows 7
Thanks in advance
Got excited about Ionic adding Crosswalk and now my project won't build. The project was compiling and working before updating and adding Crosswalk. Anyone have any suggestions on how I can correct the error below? I prefer not to rollback. Thank goodness for version control :)
System information:
OS: Windows 8
Node Version: v0.10.32
Cordova CLI: 4.2.0
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.3.1
AngularJS v1.3.8
WARNING [Project: :org.apache.cordova.engine.crosswalk:382300-xwalk_core_library] Current NDK support is deprecated. Alternative will be provided in the future.
:mergeDebugResourcesC:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine
.crosswalk\rsgapp382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png
ERROR: Unable to open PNG file
Error: Failed to run command:
C:\Users\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe s-i C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png -o C:\Users\platforms\android\build\intermediates\res\debug\drawable-hdpi-v4\color_picker_advanced_select_handle.png
Error Code: 42
Output: C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_pick
er_advanced_select_handle.png
ERROR: Unable to open PNG file
:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':mergeDebugResources'.
Error: Failed to run command: C:\Users\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe s -i C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png -o C:\Users\platforms\android\build\intermediates\res\debug\drawable-hdpi-v4\color_picker_advanced_select_handle.png
Error Code: 42
Output: C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png
ERROR: Unable to open PNG file
Looks like you were getting similar errors to this question, which was that on Windows, path names are restricted to 260 characters, so moving to a directory with a shorter path name should fix your issues.