I am using Webview version
webview_flutter: ^2.0.6
The android studio while running throws this error and stop the build
Os Version
minSdkVersion 19
targetSdkVersion 30
A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31:
error: cannot find symbol private
ThreadedInputConnectionProxyAdapterView proxyAdapterView;
^ symbol: class ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView
A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112:
error: cannot find symbol
new ThreadedInputConnectionProxyAdapterView(
^ symbol: class ThreadedInputConnectionProxyAdapterView location: class
InputAwareWebView Note: Some input files use or override a deprecated
API. Note: Recompile with -Xlint:deprecation for details. 2 errors
FAILURE: Build failed with an exception.
How to fix this error?
ThreadedInputConnectionProxyAdapterView has wrong extension .jav
just change it to .java until the flutter team release the fix.
Please refer to the github link for the issue
https://github.com/flutter/flutter/issues/82800
As Ravi stated, renaming the file extension to .java does the trick.
The file can be found at:
{your flutter folder}\.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\ThreadedInputConnectionProxyAdapterView.java
Related
I added file_picker to pubspec.yaml, tried to build the app, and then I got this error.
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\file_picker-4.0.2\android\src\main\java\com\mr\flutter\plugin\filepicker\FileUtils.java:186: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
^
symbol: variable R
location: class VERSION_CODES
I already ran flutter clean, rebuild and tried different versions of this package, but the error is still the same.
Try setting compileSdkVersion to 30 in build.gradle file
android {
compileSdkVersion 30
}
New to android dev.
I want to contribute to an open-source app that I use on a day to day basis but I'm struggling to run it on an emulator on Android Studio.
I've cloned it on my machine, clicked 'import project (Gradle, Eclipse,.. ADT)', selected my folder..etc..
I've created a virtual device and when I click on the triangle button, the project doesn't appear as an app on the phone?
There are some build errors which I suspect are the source of my problems but I have no idea how to resolve them.
Error:(11, 33) java: package android.support.v4.widget does not exist
Error:(28, 13) java: cannot find symbol
symbol: class SwipeRefreshLayout
location: class it.rignanese.leo.slimfacebook.MessagesActivity
_
Error:(18, 30) java: package android.support.v4.app does not exist
Error:(19, 34) java: package android.support.v4.content does not exist
Error:(96, 44) java: cannot find symbol
symbol: variable ContextCompat
location: class it.rignanese.leo.slimfacebook.PictureActivity
Error:(102, 13) java: cannot find symbol
symbol: variable ActivityCompat
location: class it.rignanese.leo.slimfacebook.PictureActivity
_
Error:(17, 33) java: package android.support.v4.widget does not exist
Error:(46, 13) java: cannot find symbol
symbol: class SwipeRefreshLayout
location: class it.rignanese.leo.slimfacebook.MainActivity
Googling on stackoverflow suggested adding a line to the dependencies section in build.gradle, but it already contains implementation 'com.android.support:support-v4:28.0.0' so the errors shouldn't be there, right?
Appreciate any advice.
Deps:
"native-base": "2.3.5",
"react": "16.0.0",
"react-native": "0.50.4",
"react-native-admob": "^2.0.0-beta.3",
After an update from RN 0.45 to 0.50 and RN-Admob from 1.3.2 to 2.0.0-beta.3
When trying to build with react-native run-android
/node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobInterstitialAdModule.java:117:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java:129:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNPublisherBannerViewManager.java:252:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNPublisherBannerViewManager.java:271:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobBannerViewManager.java:223:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray 5 errors
:react-native-admob:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':react-native-admob:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
I tried also RN 0.51 and manual unlink and re-link but nothing worked.
I think your android project still have the old linking.
You should open your project in android studio and check your main activity class
Try to check your MainActivity first, and even if error occurs. Then i think you have to downgrade your react-native-admob version form v2.0.0 to v1.3.2. It will work definitely.
Because, there is some issue in v2.0.0 which is still beta. You can check more about this issue on github here, https://github.com/sbugert/react-native-admob/issues/231
After days of investigations and unlinking and re-linking I solved it with:
maven {
url "$rootDir/../node_modules/react-native/android"
}
in build.gradle file.
Old url was "$projectDir/../../node_modules/react-native/android"
So it was a gradle issue. When building it used to get old react-native android libs.
Update the file :- Build.gradle(react-native-admob)
//implementation 'com.google.android.gms:play-services-ads:+' // Comment this line
implementation 'com.google.android.gms:play-services-ads:19.7.0' // Add this line
I am trying build a Android project in Phonegap.
On "cordova build" command i am getting the below error
My project folder Path: Audio\platforms\android\...
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:43: error: cannot find symbol
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:38: error: cannot find symbol
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:43: error: cannot find symbol
CordovaLib\src\org\apache\cordova\IceCreamCordovaWebViewClient.java:34: error: cannot find symbol
CordovaLib\src\com\squareup\okhttp\internal\http\HttpsURLConnectionImpl.java:347: error: method does not override or implement a method from a supertype
[javac] #JavascriptInterface
...
Basically they are pointing to my "CordovaLib\src" #JavascriptInterface. Why is this, Where do i am missing
Please Help ..
CordovaLib\src\com\squareup\okhttp\internal\http\HttpsURLConnectionImpl.java:347: method does not override or implement a method from a supertyp **this error showing**
Some out of date packages on you machine were creating this. please upgrade everything it will works fine.
I am trying to build following CyanogenMod (can be found here) projects:
android_packages_apps_Contacts
android_packages_apps_ContactsCommon
android_packages_apps_Calendar
android_packages_providers_ContactsProvider
android_packages_providers_CalendarProvider
I'm using AndroidStudio. Downloaded and imported the projects.
Changing the Android SDK versions with no result.
The errors are as follows:
Error:(37, 33) java: package com.google.common.collect does not exist
Error:(23, 25) java: package com.android.vcard does not exist
Error:(134, 6) java: cannot find symbol
symbol: class VisibleForTesting
location: class com.android.contacts.common.util.SearchUtil
How can I build these projects? Do I need some other libriaries? Maybe I need to use CyanogenMod libriaries instead of Android SDK?
Here is the detailed info.