Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compileSdk() for arguments [33] on object of type com.android.build.gradle.LibraryExtension.
please help to setup android studio.
I faced many problems to run project in android studio.
Related
Hello everyone I'm asking for help here because after a week of searching and trying I still can't solve an error, preventing me from recompiling my flutter application into an android version.
Here are the facts: After installing the flutter_js package, impossible to launch the application on android the complete error is the following:
Build file 'D:\Nouveau dossier\projet\android\app\build.gradle' line: 28
A problem occurred evaluating project ':app'.
No signature of method: build_3ov23u7xor54ble5ncs4vfgan.android() is applicable for argument types: (build_3ov23u7xor54ble5ncs4vfgan$_run_closure2) values: [build_3ov23u7xor54ble5ncs4vfgan$_run_closure2#1d78c292]
This is my gradle configuration : -
I tried to solve it by reading all the similar posts on this and other forums but no result.
Thank you so much for your help!
Simeon
I'm currently creating an application with Android Studio and Kotlin.
This morning, when I tried to run the app on the emulator and my phone, I got an error but what I don't understand it's I barely change the code : I just added a textview (tried to delete it but I still got the error. I tried to investigate and do think but none of them worked. I still don't really understand the error, could you help me fix it ?
Here the error :
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Caused by: com.android.aaptcompiler.ResourceCompilationException: Resource compilation failed. Check logs for details.
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:126)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable$Companion.compileSingleResource(ResourceCompilerRunnable.kt:34)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable.run(ResourceCompilerRunnable.kt:15)
at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
... 3 more
Caused by: java.lang.NullPointerException
at com.android.aaptcompiler.TableExtractor.flattenXmlSubTree(TableExtractor.kt:851)
at com.android.aaptcompiler.TableExtractor.parseXml(TableExtractor.kt:516)
at com.android.aaptcompiler.TableExtractor.parseArrayImpl(TableExtractor.kt:1300)
at com.android.aaptcompiler.TableExtractor.parseStringArray(TableExtractor.kt:1243)
at com.android.aaptcompiler.TableExtractor.access$parseStringArray(TableExtractor.kt:146)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor.extractResource(TableExtractor.kt:458)
at com.android.aaptcompiler.TableExtractor.extractResourceValues(TableExtractor.kt:267)
at com.android.aaptcompiler.TableExtractor.extract(TableExtractor.kt:182)
at com.android.aaptcompiler.ResourceCompiler.compileTable(ResourceCompiler.kt:186)
at com.android.aaptcompiler.ResourceCompiler.access$compileTable(ResourceCompiler.kt:1)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:123)
... 29 more
Thanks a lot
EDIT :
So, I've searched a lot, tried many things but none of them worked. Because my project is still small, I created a new project and copy/paste all my code and I this new project everything work and I don't have any error anymore.
Good luck if you encounter the same error.
Just had this error myself and after awhile managed to find the issue, I had strings within array-lists located in my strings.xml, some of my strings included apostrophes, for instance in don't won't can't.
Removing these allowed me to build my project again.
The solution that worked for me is locate the String.xml file. Delete the unused Strings I meant the strings that didnt had any reference in arrayList file.
Make sure gradle offline mode is not enabled.
Then do file->invalidate
then click invalidate and restart.
This should solve the issue
Hi, I am trying to include in my project using react-native-webrtc react native module but I am getting the following error. The main tip is that I got the same error when I used jitsi. Has anyone encountered this problem before? I've never seen a similar anywhere.
1. Application is receiving build success
2. App crashes when runtime
3. Unfortunately I have no more arguments for solving this problem.
E/System: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.StringBlock.close()' on a null object reference
at android.content.res.ApkAssets.close(ApkAssets.java:201)
at android.content.res.ApkAssets.finalize(ApkAssets.java:191)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:929)
I have migrated my Xamarin.Android to Android X in Xamarin Forms. After migrating I got several issues and closed them one by one. I got stuck with below issue where I couldn't able to resolve it.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error XA4215: The Java type `mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted. (XA4215) (EmployeeApp.Droid)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error XA4215: `mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor` generated by: Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.Android.Support.Media.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (XA4215) (EmployeeApp.Droid)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error XA4215: `mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor` generated by: Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.AndroidX.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (XA4215) (EmployeeApp.Droid)
I tried several approaches mentioned in Android X github
https://github.com/xamarin/AndroidX/issues/71 but still I am facing this issue.
Please help me. Thanks in advance.
I have downloaded sdk-tools-windows-4333796.zip file from official website and extracted in a folder. But I am facing below issue while opening sdkmanager.bat from cmd.
Error : Exception in thread "main"
java.lang.IncompatibleClassChangeError at
java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodH
andleNatives.java:383) at
com.android.sdklib.tool.sdkmanager.InstallAction.register(InstallActi
on.java:46) at
com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(Sdk
ManagerCliSettings.java:65) at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.j
ava:57) at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.j
ava:48) Caused by: java.lang.NoSuchMethodException: no such method:
java.lang.invoke.Lam
bdaMetafactory.metafactory(Lookup,String,MethodType,MethodType,MethodHandle,Meth
odType)CallSite/invokeStatic at
java.lang.invoke.MemberName.makeAccessException(MemberName.java:765)
at
java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:882
) at
java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.jav
a:1018) at
java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(Method
Handles.java:1322) at
java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodH
andleNatives.java:381) ... 4 more Caused by:
java.lang.NoSuchMethodError: java.lang.invoke.LambdaMetafactory.metaf
actory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invok
e/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/l
ang/invoke/MethodType;)Ljava/lang/invoke/CallSite; at
java.lang.invoke.MethodHandleNatives.resolve(Native Method) at
java.lang.invoke.MemberName$Factory.resolve(MemberName.java:854)
at
java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:879
) ... 7 more
I installed the whole Android Studio that comes with the SDK Manager.
Others seem to have solved this by updating Java or installing the latest Java jdk.
If that doesnt help post your Java version here.