Can anybody tell me what to do about these error. Everything is working fine when I run the same app on ios. For android I am getting the below exception. One error is plugin not found. Another one is some compilation issues.
Plugin project :firebase_auth_web not found. Please update settings.gradle.
Plugin project :firebase_core_web not found. Please update settings.gradle.
Plugin project :cloud_firestore_web not found. Please update settings.gradle.
Note: /Users/daljitsingh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.7/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/daljitsingh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.VisibleForTesting;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
/Users/daljitsingh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java:73: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CODE_TAKE_VIDEO_WITH_CAMERA = 2353;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
/Users/daljitsingh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java:74: error: cannot find symbol
#VisibleForTesting static final int REQUEST_EXTERNAL_VIDEO_STORAGE_PERMISSION = 2354;
^
symbol: class VisibleForTesting
FAILURE: Build failed with an exception.
Update the Android Integration part of each of these plugins pub page: https://pub.dev/packages/firebase_auth ...
Related
Tried to run my flutter app on a physical device, and the following error keeps showing:
Launching lib/main.dart on Pixel 3a in debug mode...
Running Gradle task 'assembleDebug'...
Note: /Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.4/android/src/main/java/com/baseflow/googleapiavailability/GoogleApiAvailabilityPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.3.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.2.2/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.2.2/android/src/main/java/io/flutter/plugins/firebase/firestore/streamhandler/TransactionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:284: error: cannot find symbol
|| (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && permission.equals(Manifest.permission.ACCESS_BACKGROUND_LOCATION));
^
symbol: variable Q
location: class VERSION_CODES
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:284: error: cannot find symbol
|| (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && permission.equals(Manifest.permission.ACCESS_BACKGROUND_LOCATION));
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:308: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
^
symbol: variable Q
location: class VERSION_CODES
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:309: error: cannot find symbol
names.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:330: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(Manifest.permission.ACCESS_BACKGROUND_LOCATION, context)) {
^
symbol: variable Q
location: class VERSION_CODES
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:330: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(Manifest.permission.ACCESS_BACKGROUND_LOCATION, context)) {
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:331: error: cannot find symbol
permissionNames.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
/Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java:372: error: cannot find symbol
return locationManager.isLocationEnabled();
^
symbol: method isLocationEnabled()
location: variable locationManager of type LocationManager
Note: /Users/jasonlloyd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/android/src/main/java/com/baseflow/location_permissions/LocationPermissionsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':location_permissions: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 10s
Exception: Gradle task assembleDebug failed with exit code 1
I've tried following the advice here: Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio but doesn't work still. Any ideas?
Did you allow Background location in Manifest?
<manifest ... >
<!-- Required only when requesting background location access on
Android 10 (API level 29) and higher. -->
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
</manifest>
Solved! I simply needed to update one of my dependencies in pubspec.yaml to the latest version, specifically changing location pacakage to location: ^4.3.0. Hope this helps someone in the future.
I created a new project, added dependencies
when I launch it
flutter pub run build_runner build
I get:
/C:/Users/Michael/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-1.6.0/lib/src/error/best_practices_verifier.dart:1600:40: Error: Getter not found: 'topLevelVariable'.
return kinds.contains(TargetKind.topLevelVariable);
^^^^^^^^^^^^^^^^
/C:/Users/Michael/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-1.6.0/lib/src/error/best_practices_verifier.dart:2024:23: Error: Getter not found: 'topLevelVariable'.
case TargetKind.topLevelVariable:
^^^^^^^^^^^^^^^^
/C:/Users/Michael/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-1.6.0/lib/src/error/best_practices_verifier.dart:2024:23: Error: Type 'dynamic' of the case expression is not a subtype of type 'TargetKind' of this switch
expression.
- 'TargetKind' is from 'package:meta/meta_meta.dart' ('/C:/Users/Michael/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.3.0/lib/meta_meta.dart').
case TargetKind.topLevelVariable:
^
/C:/Users/Michael/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-1.6.0/lib/src/error/best_practices_verifier.dart:2001:13: Context: The switch expression is here.
switch (this) {
^
pub finished with exit code 1
I've read everything on stackoverflow, but I haven't found a solution.
Any idea?
Specify the analyzer version
analyzer: 1.5.0
Warning: do not up to the latest version, because it depends on meta package as is flutter_test - where you can't specify the version
Task :app:compileReleaseJavaWithJavac FAILED
/app/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:11: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
/app/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:137: error: cannot find symbol
#RequiresApi(Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
location: class IonicWebViewEngine.ServerClient
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
after installing cordova-plugin-fcm-with-dependecy-updated
After removing webview plugin build was successful.
I want to integrate mapbox using flutter
The thing I am doing is just installing my sdk in pubsec.yaml and placing the access token in Android Manifest file and Info.plist
Here is my pubsec.yaml where I am adding mapbox_gl
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
mapbox_gl: ^0.0.3
I have not yet added any code in dart file and just trying to run the application but it gives me the error
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:16: error: cannot find symbol
import androidx.annotation.NonNull;
^
symbol: class NonNull
location: package androidx.annotation
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:130: error: cannot find symbol
private static String getAccessToken(#NonNull Context context) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:298: error: cannot find symbol
private void enableLocationComponent(#NonNull Style style) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:315: error: cannot find symbol
private void enableSymbolManager(#NonNull Style style) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:326: error: cannot find symbol
private void enableLineManager(#NonNull Style style) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:333: error: cannot find symbol
private void enableCircleManager(#NonNull Style style) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:556: error: cannot find symbol
public boolean onMapClick(#NonNull LatLng point) {
^
symbol: class NonNull
location: class MapboxMapController
/flutter/.pub-cache/hosted/pub.dartlang.org/mapbox_gl-0.0.3/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java:286: error: cannot find symbol
public void onStyleLoaded(#NonNull Style style) {
^
symbol: class NonNull
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
8 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mapbox_gl: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.
BUILD FAILED in 4s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
Any help is appreciated.
That's an AndroidX compatibility issue.
Add this to your android/gradle.properties and try to build again:
android.enableJetifier=true
android.useAndroidX=true
(Official docs about AndroidX migration on Flutter)
I wonder if I am doing something wrong, or if I have stumbled upon a bug in LibGDX/GWT. I have a game with desktop/Android/iOS/HTML backends and upgrading to 1.9.5 from 1.9.5-SNAPSHOT from about a month ago made the HTML build stop working. The main change I can see is the upgrade to GWT 2.8.0 from 2.6.0.
When I run my app in a browser (Chrome 56.0.2924.21 beta (64-bit) on Windows 10), I get the following error:
GwtApplication: exception: com.badlogic.gdx.utils.SerializationException: Error reading file: static/uiskin_hd.json
com.badlogic.gdx.utils.SerializationException: Error reading file: static/uiskin_hd.json
Error reading file: static/uiskin_hd.json
Error reading file: static/uiskin_hd.json
Error loading bitmap font: static/helsinki28plain_hd.fnt
Error loading font file: static/helsinki28plain_hd.fnt
Invalid page id:
For input string: ""
The font has been working previously and I get the same result with any font, including default.fnt from LibGDX tests. The top of the font file looks like this:
info face="Helsinki" size=56 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=2,2,8,4 spacing=0,0
common lineHeight=75 base=52 scaleW=512 scaleH=1024 pages=1 packed=0
page id=0 file="helsinki28plain_hd.png"
chars count=141
char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=52 xadvance=22 page=0 chnl=0
char id=92 x=0 y=0 width=24 height=72 xoffset=-2 yoffset=0 xadvance=22 page=0 chnl=0
char id=47 x=24 y=0 width=24 height=72 xoffset=-2 yoffset=0 xadvance=22 page=0 chnl=0
...
Just to make sure the problem isn't with my setup, I checked out the latest master branch of LibGDX and tried to run the GWT tests:
git clone https://github.com/libgdx/libgdx.git
cd libgdx
ant -f fetch
ant
./gradlew tests:gdx-tests-gwt:draftRun
This also seems to fail:
Compiling module com.badlogic.gdx.tests.gwt.GdxTestsGwt
Finding entry point classes
[ERROR] Errors in 'file:/C:/devtools/libgdx/gdx/src/com/badlogic/gdx/Net.java'
[ERROR] Line 80: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtNet.java'
[ERROR] Line 70: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/Preloader.java'
[ERROR] Line 200: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Line 203: No source code is available for type java.io.ByteArrayInputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/files/FileHandle.java'
[ERROR] Line 78: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/gdx/src/com/badlogic/gdx/net/Socket.java'
[ERROR] Line 41: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/Blob.java'
[ERROR] Line 38: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/BufferedInputStream.java'
[ERROR] Line 19: No source code is available for type java.io.FilterInputStream; did you forget to inherit a required module?
[ERROR] Line 20: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Reader.java'
[ERROR] Line 33: No source code is available for type java.io.Closeable; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/devtools/libgdx/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Writer.java'
[ERROR] Line 30: No source code is available for type java.io.Closeable; did you forget to inherit a required module?
[ERROR] Line 30: No source code is available for type java.io.Flushable; did you forget to inherit a required module?
[ERROR] Unable to find type 'com.badlogic.gdx.tests.gwt.client.GwtTestStarter'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
:tests:gdx-tests-gwt:draftCompileGwt FAILED
Any ideas what is going on here? (My Java SDK is jdk1.8.0_20)
Looks like this is a bug in LibGDX 1.9.5. A couple of people have submitted pull requests to fix it, so I expect there will shortly be a 1.9.6-SNAPSHOT available fixing this issue.
https://github.com/libgdx/libgdx/pull/4475
https://github.com/libgdx/libgdx/pull/4467