Posts

Showing posts with the label android-studio

Android Studio Gradle: Please remove usages of `jcenter()` Maven repository from your build scripts / JCenter is at end of life

9 3 In Android Studio 4.2 there is a warning: buildscript { ext.kotlin_version = '1.5.0' repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() mavenCentral() } } If I remove jcenter() then it can't find some dependencies of my app project: > Could not find org.koin:koin-core:2.0.1. Required by: project :app > Could not find org.koin:koin-androidx-scope:2.0.1. Required by: project :app > Could not find org.koin:koin-and...

Gradle tasks are not showing in the gradle tool window in Android Studio 4.2

53 4 I just updated Android Studio to version 4.2. I was surprised to not see the Gradle tasks in my project. In the previous version, 4.1.3, I could see the tasks as shown here: But now I only see the dependencies in version 4.2: I tried to clear Android Studio's cache and sync my project again, but there was no change. Is this a feature change? android-studio gradle android-studio-4.2 Share Improve this question Follow ...

Android Studio 4.2 Kotlin Plugin Issue

21 2 Cannot build a new project using Android Studio 4.2 because of the following error: A problem occurred configuring root project 'My Application'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom Required by: project : Possible solution: - Declare repository providing the artifact, see the docum...

Gradle tasks are not showing in gradle tool window in android studio 4.2

12 I just updated my android studio to version 4.2 . I had the surprise to not see the Gradle tasks in my project. It was working in the previous version 4.1.3 as we can see here: But now I only see the dependencies in version 4.2 : I tried to clear the cache of android studio and sync my project again. But no change. May it is a feature changes ? But I do not think so because it is really annoying to not see the gradle tasks in this tab. May someone got a solution about this ? I could see anything related to this problem on internet. Thanks a lot ! android android-studio gradle android-studio-4.2 ...

Can't create new Kotlin project after updating to Android Studio 4.2

6 I updated Android studio 4.2 but I wasn't able to create new project kotlin A problem occurred configuring root project 'My Application'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release- 764/kotlin-gradle-plugin-1.5.0-release-764.pom - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gr...

Emulator appearing offline on M1 Mac after the last update of arm64-v8a

8 3 Yesterday the emulator was working perfectly. The system image was arm64-v8a. I don't exactly remember the Release name of the working system image but, yesterday there was an update for the ARM 64 system image which I accepted and the release name is "S". I can start the emulator from my AVD Manager, the emulator also starts when I press the 'Run app' button however, the app isn't loaded on the emulator and the emulator appears offline if I check through "adb devices" or if I click on "Troubleshoot Device connections" it shows: "emulator-5554 - Device is currently in the offline state" I have tried most of the suggestions found on StackOverflow like: adb kill-server, adb start-server Remove and re-creat...

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

20 I download the newest Android Studio, I want to run the Android Jetpack Compose Project, But when I run , I got the error: > Failed to apply plugin 'com.android.internal.application'. > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing `org.gradle.java.home` in `gradle.properties`. I already download Java 11, And add java 11 in gradle.properties. org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home The JAVA_HOME shows Java 11, But I run, It doesn't work, /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home How should I d...

React-Native project stuck on :app:installDebug

Every time I run my react-native project it's stuck in 99%. I've tried to run ./Gradlew clean and kill adb but nothing works. I already used my device via usb, genymotion and android studio emulator and it always the same... Building and installing the app on the device (cd android && gradlew.bat install Debug)... Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :react-native-maps:preBuild UP-TO-DATE :react-native-maps:preReleaseBuild UP-TO-DATE :react-native-maps:checkReleaseManifest :react-native-maps:preDebugAndroidTestBuild UP-TO-DATE :react-native-maps:preDebugBuild UP-TO-DATE :react-native-maps:preDebugUnitTestBuild UP-TO-DATE :react-native-maps:preReleaseUnitTestBuild UP-TO-DATE :react-native-maps:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :react-native-maps:prepareComAndroidSupportSupportV42400Libr...

React native inside Fragment Android

I am trying to open react native pages inside a fragment in android. I followed the following link React-native inside a Fragment I am able to open the react native page but the touchlisteners inside react pages are not working. Can somebody can suggest some method how to do it as the react native loses its focus when added to a fragment.

Flutter Installation Error

When i try to install Flutter in Android Studio as Plugin i got this error But in Flutter Doctor its showing everything is fine My pc configuration is i7, 8GB, 1TB, Windows 10 What should i do ?

Flutter commands is not workimg

when I run flutter command as a root user it did not run but it show something like an error Woah! You appear to be trying to run flutter as root. We strongly recommend running the flutter tool without superuser privileges. / ???? Doctor summary (to see all details, run flutter doctor -v): Dart_NewStringFromUTF8 expects argument 'str' to be valid UTF-8. I do not understand what I am doing wrong .Kindly help me. I am trying to run flutter in Kali Linux with android studio installed. Did I need to run flutter as a non-root user, if yes then I need to install everything for another user . is there any way to do this? Run flutter doctor and do as it suggest Since you have installed the android studio in your root account. there is no other option for you. you have to give a non-root user the permission to use it. you cant log in the shell alone also. I recommend you to install only flutter there and use in some text editor an shell commands that's better than as. kal...

Flutter: Create a flutter project with Swift

Flutter allows to support of Swift programming language. How can I integrate my Swift code file with Flutter project in Android Studio. There is no option to add/create a Swift file (in New menu) in Android Studio. Flutter uses Dart language. Android - Java/Kotlin , iOS - Objc/Swift could be used to write plugins and platform dependent code. More details https://flutter.io/developing-packages/ When Flutter creates new project, it generates 2 native projects (iOS and Android), that would be able to run compiled Flutter project. Languages are selected via menu you posted. Check ios and android folders in created project. the best option will be to open your ios folder in xcode and add and edit your code there

Flutter not detecting Android SDK

I've been trying to get flutter to detect the Android SDK. flutter doctor returns PS I:\Projects\Flutter\fluttertest\flutterproject> flutter doctor -v [√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.248], locale en-US) • Flutter version 0.1.5 at I:\Source\flutter • Framework revision 3ea4d06340 (7 days ago), 2018-02-22 11:12:39 -0800 • Engine revision ead227f118 • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759 [!] Android toolchain - develop for Android devices • Android SDK at C:\NVPACK\android-sdk-windows • Android NDK location not configured (optional; useful for native profiling support) • ANDROID_HOME = C:\NVPACK\android-sdk-windows X Android SDK is missing command line tools; download from "link to google" • Try re-installing or updating your Android SDK, visit https://flutter.io/setup/#android-setup for detailed instructions. [√] Android Studio (version 3.0...

Flutter: Create a flutter project with Kotlin

Flutter allows to support of Kotlin language. How can I integrate my kotlin file with Flutter project. There is no option to add/create a Kotlin file (in New menu) in Android Studio. I think the kotlin files can only be used in the platform-specific plugins. E.g. you have platform-specific implementation for both iOS and android and you can use kotlin for the Android part. The Flutter SDK is used directly with Dart. Open your Android module in android so you can add your kotlin files

Flutter: pub get failed

Flutter project showing me a warning 'Packages get' has not been run with suggested solutions, Get Dependencies Upgrade Dependencies Ignore As suggested by Darky, in this answer to go ahead with 'Get Dependencies' I tried it but it shows me an error: pub get failed /SoftSources/Flutter/flutter/bin/flutter --no-color packages get Running "flutter packages get" in catalog... Incompatible version constraints on test: - flutter_test 0.0.0 depends on version 0.12.30+3 - sample_catalog depends on version 0.12.30+4 pub get failed (1) Process finished with exit code 1 An error indicates an issue with version of project (or something else), where should change it in my flutter project? Edit: pubspec.yaml name: sample_catalog description: A collection of Flutter sample apps dependencies: flutter: sdk: flutter path: 1.5.1 dev_dependencies: flutter_test: sdk: flutter flutter_driver: sdk: flutter args: 1.3.0 # TRANSITIVE DEPENDENCY async: 2.0.4 # ...

flutter run: No connected devices

I am trying to create a sample application with flutter (fresh installation) android studio is also installed (fresh installation) Here is the output of flutter run flutter run No connected devices. the output of flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) [✓] Android Studio (version 3.0) [!] VS Code (version 1.20.1) [!] Connected devices ! No devices available ! Doctor found issues in 2 categories. Is there is a solution ? Flutter supports both iOS and Android device/simulators. In terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. Here is reference document, How you can setup Device/Simulator to run your application. For, Android (on mac system) Set up your Android device To prepare to run and test your Flutter app on an Android device, you’ll need an And...

Flutter Doctor (Incorrectly?) Reporting Android Studio Flutter Plugin Not Installed

When I ran flutter doctor it reports that my Android Studio Flutter and Dart plugins are not installed, even though I have the latest installed - and in fact, I can build and deploy a flutter app to a mobile device from Android Studio. I think either my config somewhere isn't correct or flutter doctor has a bug. When I run flutter doctor -v I get the following: d:\Dev\Flutter>flutter doctor -v [√] Flutter (Channel master, v0.5.8-pre.264, on Microsoft Windows [Version 10.0.17134.165], locale en-AU) • Flutter version 0.5.8-pre.264 at D:\Dev\Flutter\Flutter • Framework revision b32c77a012 (12 hours ago), 2018-08-07 17:09:14 -0700 • Engine revision 7f083e54fe • Dart version 2.0.0-dev.69.5.flutter-b04def964c [√] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at D:\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.3 • ANDROID_HOME ...