I recently installed wechat_assets_picker, however when trying to build for android I get the following error, nothing in thier docs about it and no issues on thier issue list either.
e: /Users/remelehane/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.6.0/android/src/main/kotlin/top/kikt/imagescanner/core/PhotoManagerDeleteManager.kt: (116, 36): Unresolved reference: R
e: /Users/remelehane/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.6.0/android/src/main/kotlin/top/kikt/imagescanner/core/PhotoManagerDeleteManager.kt: (119, 36): Unresolved reference: createTrashRequest
e: /Users/remelehane/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.6.0/android/src/main/kotlin/top/kikt/imagescanner/core/PhotoManagerPlugin.kt: (341, 84): Unresolved reference: R
e: /Users/remelehane/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.6.0/android/src/main/kotlin/top/kikt/imagescanner/core/utils/Android30DbUtils.kt: (34, 34): Unresolved reference: R
e: /Users/remelehane/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.6.0/android/src/main/kotlin/top/kikt/imagescanner/core/utils/IDBUtils.kt: (27, 67): Unresolved reference: R
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':photo_manager:compileReleaseKotlin'.
> Compilation error. See log for more details
The erroring line is #RequiresApi(Build.VERSION_CODES.R) which from what I understand means this function on runs in version R of the android SDK, which is OS11, so should not be affecting the build?
I checked with the example project which is running SDK min 21 and compiled of 29.
Mine is running 19 and 21, however changign to 21 did not get around the build error so there must be more to is than that?
TIA
The issue is as a result of the compiledSdkVersion being set to 29, it needs to be set to 30
Each time you upgrade your pubspecs, or run a pub upgrade, you need to run flutter clean. And it should solved. Specific to the photo_manager.
Related
I need to add this react-native-screens dependence into my app and when I run android build this dependence fails
> Task :react-native-screens:compileDebugKotlin FAILED
I am implementing a react-native app (as a module) into an existing native app. And this app is completely in Kotlin. I follow the official doc and all looks fine but this lib has some problem
this is the error that I have in the android studio:
e: /Users/lk/Docu....reens/RNScreensPackage.kt: (9, 1):
Class 'RNScreensPackage' is not abstract and does not implement abstract member public
abstract fun createJSModules(): (Mutable)List<Class<out JavaScriptModule!>!>!
defined in com.facebook.react.ReactPackage
and this is what i have when i run react-native run-android
> Task :react-native-screens:compileDebugKotlin FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
50 actionable tasks: 16 executed, 34 up-to-date
e: /pathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt: (9, 1): Class 'RNScreensPackage' is not abstract and does not implement abstract member public abstract fun createJSModules(): (Mutable)List<Class<out JavaScriptModule!>!>! defined in com.facebook.react.ReactPackage
e: /pathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (11, 34): Unresolved reference: GuardedRunnable
e: /pathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (77, 13): Type mismatch: inferred type is <no name provided> but Runnable! was expected
e: /pathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (77, 22): Unresolved reference: GuardedRunnable
e: /pathtoprojectnode_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (78, 17): 'runGuarded' overrides nothing
e: /Upathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (81, 27): Unresolved reference: updateNodeSize
e: /pathtoproject/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt: (15, 40): Unresolved reference: ChoreographerCompat
...and more
I'm trying to work with Travis CI, and previously I have try to build my project in the Android Studio's terminal with ./gradlew build or with ./gradlew clean build but both throws "Execution failed for task ':presentation:compileReleaseKotlin'." however when I build my project from the Android Studio's toolbar it works perfectly.
You can see the whole stacktrace and all the information here gradle stacktrace
Thanks in advance,
Javi
Check your Constants class for errors.
e: /Users/jcamarero/AndroidStudioProjects/boton/presentation/src/main/java/com/b4motion/boton/utils/Constants.kt: (48, 31): Const 'val' initializer should be a constant value
e: /Users/jcamarero/AndroidStudioProjects/boton/presentation/src/main/java/com/b4motion/boton/utils/Constants.kt: (48, 46): Unresolved reference: URL_WEB_VIEW
e: /Users/jcamarero/AndroidStudioProjects/boton/presentation/src/main/java/com/b4motion/boton/utils/Constants.kt: (49, 29): Const 'val' initializer should be a constant value
e: /Users/jcamarero/AndroidStudioProjects/boton/presentation/src/main/java/com/b4motion/boton/utils/Constants.kt: (49, 44): Unresolved reference: URL_WEB_VIEW
This error says that you have a const val in your Constants class defined but it is not constant at compile time. Also, it cannot find reference to URL_WEB_VIEW.
The problem is that since this morning (I believe, I have not worked yesterday) when I try to run my ionic 3 application on the device I get an AAPT error.
To recreate the problem I started from a scratch app.
I create a simple new ionic application:
ionic start gradleError tabs
Now if I try to run it on my device it works
Let's say I want to add this plugin using simply this two commands:
ionic cordova plugin add cordova-plugin-mauron85-background-geolocation
npm install --save #ionic-native/background-geolocation
Now when I try to run it on my device I get the following Errors:
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Reading the error output is seems that the problem is this one:
fontVariationSettings not found.
ttcIndex not found.
First fix attempt was made by changing inside "platforms/android/project.properties" the line into:
cordova.system.library.2=com.android.support:support-v4:26+
After trying to run in on device I start to get a bunch of errors which looks like:
/Users/zeno/Desktop/Bachelor/App/gradleError/test/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:563: error: cannot find symbol
#TargetApi(Build.VERSION_CODES.KITKAT)
^
symbol: variable KITKAT
location: class VERSION_CODES
/Users/zeno/Desktop/Bachelor/App/gradleError/test/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:297: error: cannot find symbol
LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
^
symbol: variable MATCH_PARENT
With ate the end:
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
Now following what has been said on the ionic forum I tried to run the following command:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.0.0
with which I get the same errors as the change I made before.
I tried also to play with the system and the numbers, from 27 to 27.1 to 24 and so on, nothing changed.
Can't build streamer tutorial_3 for android on mac
I,ve got all environment variables needed.
My eclipse can't to resolve some symbols, but to some of them i can get by pushing F3. It's very strange for me.
Here is the command line output:
23:04:06 **** Build of configuration Default for project Tutorial3 ****
/Users/antonivanuskin/android-develop/android-ndk-r10/ndk-build all
GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-armeabi/gstreamer_android.c
GStreamer : [LINK] => gst-build-armeabi/libgstreamer_android.so
lto1: fatal error: bytecode stream generated with LTO version 2.2 instead of the expected 3.0
compilation terminated.
lto-wrapper: /Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm- linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc returned 1 exit status
/Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [buildsharedlibrary_armeabi] Error 1
23:04:10 Build Finished (took 3s.740ms)*
I use ndk-10r and gst-1.4.0.
I know that there is no interfaces/xoverlay in new streamer.
EDIT
I've built ok, but steel got underlines of many glib-types and GST-macross. Here is a screenshot:
what is interesting that i have no underlined headers, for example: i've include pthread.h but have got underlined pthread_t and phtread_key_t....
i think that i have not install some general libraries on my mac, something like libc or what ever...may it couse this problem? The problem is that i can't run my app from eclipse. and for more: i use DS-5 CE IDE
This is most likely because we build the android 1.4.x cerbero packages with the r9d NDK.
You might want to use the r9d NDK until we provide binaries built with a more recent NDK (started some builds to see if everything goes through fine).
I am using the trial version of Xamarin Studio for my final year project consisting an android application. Everything went smooth initially. But today right after updating to the latest stable version, i encountered an error (as stated on the title of this post).
The build log is as follows:
Building Solution: MyActivity.Mobile (Debug)
Building: MCAAndroid (Debug)
Build started 05/18/2013 17:04:44.
Project
"/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj"
(Build target(s)):
Target _CheckProjectItems:
CheckProjectItems Task
NativeLibraries:
JavaLibraries:
JavaSourceFiles:
Target _ComputeAndroidAssetsPaths:
ResourceFiles:
Assets/WebUI/newsfeed.html
Assets/WebUI/images/bg_content.png
Assets/WebUI/css/style.css
Assets/WebUI/images/flag.png
IntermediateFiles:
Target _GenerateAndroidAssetsDir: Skipping target
"_GenerateAndroidAssetsDir" because its outputs are up-to-date.
Target _ComputeAndroidResourcePaths:
ResourceFiles:
Resources/values/Strings.xml
Resources/drawable/Icon.png
Resources/layout/Login.axml
Resources/drawable/le_cool_logo.png
Resources/drawable/bg.jpg
Resources/drawable/icon_password.png
Resources/drawable/Icon_user.png
Resources/layout/Home.axml
Resources/drawable/info.png
Resources/drawable/settings.png
Resources/drawable/help.png
Resources/drawable/bg_content.png
Resources/drawable/shadow_black.9.png
Resources/drawable/cog.png
Resources/drawable/tools.png
Resources/layout/ReadMatric.axml
Resources/drawable/matric.jpg
Resources/drawable/mcalogo.png
IntermediateFiles:
Target _GenerateAndroidResourceDir: Skipping target
"_GenerateAndroidResourceDir" because its outputs are up-to-date.
Target _ResolveMonoAndroidSdks:
MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/
MonoAndroid Framework: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-10;/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1
MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/
Android NDK:
Android SDK: /Users/hazimanabhmy/Library/Developer/Xamarin/android-sdk-mac_x86/
Java SDK: /usr/
Target _ValidateAndroidPackageProperties:
GetAndroidPackageName Task
ManifestFile: /Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/Properties/AndroidManifest.xml
AssemblyName: MCAAndroid
PackageName: MCAAndroid.MCAAndroid
Target _BuildDependencies:
Resolved library outputs:
Target _ExtractLibraryProjectImports:
Assemblies:
/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.dll
/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Xml.dll
/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-10/Mono.Android.dll
/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Core.dll
Jars:
ResolvedResourceDirectories:
Target _GetLibraryImports:
NativeLibraries:
Jars:
Target _CheckDuplicateJavaLibraries:
JavaSourceFiles:
JavaLibraries:
Target _UpdateAndroidResgen:
AdditionalResourceDirectories: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:
error : Error executing task Aapt: The source sequence is empty Task
"Aapt" execution -- FAILED Done building target "_UpdateAndroidResgen"
in project
"/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj".--
FAILED
Done building project
"/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj".--
FAILED
Build FAILED. Errors:
/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj
(Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets
(_UpdateAndroidResgen target) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:
error : Error executing task Aapt: The source sequence is empty
0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.1048310
---------------------- Done ----------------------
Build: 1 error, 0 warnings
I couldn't find the cause. Would someone help me?
I have asked this same question on Xamarin.Android's forum, and still waiting for their answer. But i think i could gather more resources and insights from experts here.
It's a recent change/bug in Xamarin.Android that expects to be used with Android tools rev. 22 or later where appt has been moved around in the sdk directory (from tools to build-tools). You need to go into the android sdk manager and update the SDK tools to revision 22 (or better) and also install the new build-tools package.