bunch of errors using kotlin in android studio - android

I'm trying to run my android app using Android studio Emulator using Kotlin programming language. It stopped suddenly and gave me few error any help ?
this is what is give me now at Event log(last 6 line are in Red color)
11:18 AM Gradle sync started
11:21 AM Project setup started
11:21 AM Gradle sync finished in 2m 51s 524ms
11:21 AM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
11:22 AM Gradle build finished in 37s 164ms
11:22 AM Configure Kotlin C:/Users/ziadm/ziadsaadApp/build.gradle was modified C:/Users/ziadm/ziadsaadApp/app/build.gradle was modified
11:22 AM Gradle sync started
11:23 AM Project setup started
11:23 AM Gradle sync finished in 10s 332ms
11:23 AM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
11:23 AM Gradle build finished in 16s 593ms
11:24 AM Executing tasks: [:app:assembleDebug]
11:24 AM Emulator: init: Could not find wglGetExtensionsStringARB!
11:24 AM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
11:24 AM Emulator: Failed to obtain GLES 2.x extensions string!
11:24 AM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
11:24 AM Emulator: Process finished with exit code -1073741819 (0xC0000005)
11:25 AM Gradle build finished in 54s 739ms

The problem is with emulated Performance. Put as it is on image.

Related

react-native-gradle-plugin:compileKotlin FAILED

I upgraded react native vrsion from 0.64.1 to latest. And when try to run
cd .\android\ && ./gradlew clean
I'm getting the following error,
> Task :react-native-gradle-plugin:compileKotlin FAILED
Caching disabled for task ':react-native-gradle-plugin:compileKotlin' because:
Build cache is disabled
Task ':react-native-gradle-plugin:compileKotlin' is not up-to-date because:
Task has failed previously.
The input changes require a full rebuild for incremental task ':react-native-gradle-plugin:compileKotlin'.
'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Using Kotlin/JVM incremental compilation
[KOTLIN] Kotlin compilation 'jdkHome' argument: C:\Program Files\Java\jdk-11.0.14
i: found daemon on port 17773 (1316337 ms old), trying to connect
i: connected to the daemon
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompilationResults=[0]kotlinScriptExtensions=[kt, kts, java]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, classpathChanges=org.jetbrains.kotlin.incremental.ClasspathChanges$NotAvailable$ClasspathSnapshotIsDisabled#34aad1e, workingDir=C:\Users\Chanduka\Desktop\hutch\src\smart-app\node_modules\react-native-gradle-plugin\build\kotlin\compileKotlin, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:\Users\Chanduka\Desktop\hutch\src\smart-app\node_modules\react-native-gradle-plugin\build\kotlin\compileKotlin\build-history.bin, useModuleDetection=false), usePreciseJavaTracking=trueoutputFiles=[C:\Users\Chanduka\Desktop\hutch\src\smart-app\node_modules\react-native-gradle-plugin\build\classes\kotlin\main, C:\Users\Chanduka\Desktop\hutch\src\smart-app\node_modules\react-native-gradle-plugin\build\kotlin\compileKotlin])
my java version is 11

Cannot build RN App after integrating Sentry

OS:
MacOS
Platform:
Android
SDK:
#sentry/react-native (2.0.0)
react-native version: 0.61.4
Are you using Expo?
No
Are you using sentry.io or on-premise?
sentry.io (SaaS)
I have following issue:
When I try to to build the project by this command
npx react-native run-android
It fires this error
Task :sentry_react-native:compileDebugJavaWithJavac FAILED
570 actionable tasks: 3 executed, 567 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sentry_react-native:compileDebugJavaWithJavac'.
> java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
Expected result:
The project should be built without issue
Have you tried first doing
yarn add jetifier and then npx jetify
Then building your app.
Try this and do let me know in case of any concerns.
It worked when I switched
#sentry/react-native to version "^1.3.8"
looks it was a conflict with Gradle version

React Native: Task :app:installDebug FAILED

I am working on MAC, trying to run React Native on android but it throws this error: Task :app:installDebug FAILED. This is the full error:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 2 executed, 25 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8088
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
I've tried reinstalling Android Studio twice as well as creating a new project for RN but that didn't help me out.
I tried this as well: brew cask install android-platform-tools. Thanks.
You need to install adbExe. Please follow steps in this link

Android gradle build fails suddenly on ':app:mergeDebugResources' with no error messages

My gradle build stopped working completely out of the blue. Minute earlier it worked fine. Didn't change anything in gradle config files; as a matter of fact I was only changing application style in XML.
Make, clean and run produce:
Execution failed for task ':app:mergeDebugResources'.
> -1
Running gradle with --stacktrace produces:
Executing task ':app:mergeDebugResources' (up-to-date check took 0.031 secs) due to:
Task ':app:mergeDebugResources' class path has changed from 35ff0c585719dc5a2e2e4d58900e722a to 01ad85243d44a7018a6f6b671ff7bf6b.
All input files are considered out-of-date for incremental task ':app:mergeDebugResources'.
Unable do incremental execution: full task run :app:mergeDebugResources FAILED :app:mergeDebugResources
(Thread[Task worker for ':',5,main]) completed.
Took 0.155 secs.
Removing build directory didn't help, as well as cache invalidation and restart. Any ideas?
Using Canary (3.0) with build tools version 26.0.0.
Update #1
Running with --info --debug hints:
could not find method google() for arguments [] on repository container.
However, removing google() from config yields:
Received result
Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project '[project name]'.] from daemon DaemonInfo{pid=3686, address=[e01105f7-0954-4e44-b561-3ac18fc3194f port:35854, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=true, lastBusy=1499443736429, context=DefaultDaemonContext[uid=64f95479-4418-4e3d-948b-7481648b65df,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/iwoherka/.gradle/daemon,pid=3686,idleTimeout=10800000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
18:09:26.648 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
18:09:26.649 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
Well, it turned out that the problem was fonts in res directory instead of main which caused gradle to act very weird.

Error:Execution failed for task ':app:packageDebug'

I get this error when trying to rebuild project after generating User Interface tests using Android Test recorder plugin for Android studio (http://droidtestlab.com/).
Every time I have to relaunch Android studio and Emulator to Get rid of this error.
Tried cleaning project then got this error,
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
:clean
:app:clean FAILED
Error:Execution failed for task ':app:clean'.
> Unable to delete file: E:\..\AndroidStudio\..\app\build\outputs\apk\app-debug.apk
Information:BUILD FAILED
Is this a bug or what am I doing wrong here?
How can I fix this error?
Using Android studio 2.1.1 and Android 6.0, Nexus 5X API 23 emulator

Categories

Resources