After upgrading Android Studio to version 3.3 this week, some breakpoints are not being recognized as valid, and are not stopping the thread.
Am I missing anything?
Found the answer with the help of #pskink.
"If" statements are "invalid" locales for breakpoints. See the checkmarks below:
The issue is in the build tool chain (gradle, d8/r8). Problem is fixed in Android Studio 3.4 Beta 1 with gradle 3.4.0-beta01.
Or a workaround solution for this issue can be used by locally updating the top-level build.gradle configuration for your project:
buildscript {
repositories {
maven {
url 'http://storage.googleapis.com/r8-releases/raw' // ADD THIS.
}
}
dependencies {
classpath 'com.android.tools:r8:1.3.55' // ADD THIS. Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.3'
}
}
Once the next point release of Android Gradle Plugins takes place these changes can be removed.
For more information, see: https://issuetracker.google.com/issues/122450679
I got the same problem. The problem is solved by upgrading Android Studio from 3.6.2 to 4.0.0
it works for android 4.0.1. there is a button "attach debugger to android process" on top menu bar. click it and select the process. then the debugger will hit the break point.
Related
I have a problem: My android studio is analyzing infinitely:
I have tried:
uninstalling Android Studio
Invalidate cashes / Restart
restart my computer.
build.gradle (Project)
build.gradle (Module)
Main Activity (Analyzing text top right corner)
What can I do?
You just need to Upgrade the latest kotlin version.
Upgrade the dependency in the project's build.gradle file.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
Upgrade the dependency in the app's build.gradle file.
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.10"
Finally, I fully deleted my android studio with all connected files using this answers and then reinstalled its new stable (the same 4.2.1. version). The problem was solved.
I was also facing the same issues.
I Follow below step:
Close Project
Delete all “.idea” & ".gradle” folder
Want to solve this problem, you need to download the kotlin plugin with the version 202-1.5.0-release-764-AS8194.7 at this website https://plugins.jetbrains.com/plugin/6954-kotlin/versions, then install it.
I am able to run the project successfully. but unable to resolve this issue which is showing "kotlin Not Configured". I tried every solution for that but its always showing in the currently active file.
Please help.
Delete the .gradle and .idea file and restart the project. This seem to work for me.
Click on Tools -> Kotlin -> Configure Kotlin in Project
then choose the configurator, any one from:
Java with Gradle
Android with Gradle
try to upgrade the kotlin version in build.gradle file
ext.kotlin_version = '1.3.72'
also in the build.gradle app module file make sure implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
in the dependencies section ,
if you see at any time update the gradle option , do so
Furthermore, if you find a line
implementation "androidx.core:core-ktx:+"
in your build.gradle, you may see the warning message:
Avoid using + in version numbers, can lead to unpredictable and anrepeatable builds.
Click on "Replace with specific version", then the current installed version replaces the "+". (For example, "1.3.2")
In my case the "kotlin not configured" message and a lot of "errors" in the kotlin file disappeared.
Simply hitting "Sync Project with Gradle Files" did the job for me.
In my case, it can fix by keep the version of kotlin-gradle-plugin up to date. Check the version here: https://kotlinlang.org/docs/gradle.html#plugin-and-versions
File for configuration Location
Project -> build.gradle
//example: update this dependence:
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
}
I faced the same issue after updating to latest android electric eel. So those of you who had a kotlin project which working fine and after update failed to sync gradle files or build projects with error
"Kotlin not configured".
I think this answer might help. I'm not sure if this is the right way to do but this was a life saver for me since I was working with an old project with older dependencies and kotlin version
Just click on the gradle offline toggle and try syncing the project and building it in offline mode. That's it !!!
No need to change any version or other changes. I hope this helps and save your time.
I've been working on an android app in Android Studio 3.0 canary 6 on another computer and using Github so that I can work on the project from any computer. Unfortunately, 3.0 doesn't scale correctly on my Surface Pro 4, so it is unusable. When I load the project in 2.3, I get an error that says something along the lines of "this gradle version requires Studio 3.0". I have tried tinkering with the gradle version in 2.3, but to no avail. Is it at all possible to totally convert the project for use in 2.3 (permanently; I would have no need to use 3.o again. I was just playing around with it.), and if so, how would I go about doing that? Thank you!
Yes, you can do that.
From 3.0 to 2.3.3 you must do the following changes:
Open your project on the Android Studio 2.3.
Expand Gradle Scripts, open gradle-wrapper.properties file and change the final piece of distributionUrl attribute to /gradle-3.3-all.zip . This may vary depending on your 2.x version.
Next, open build.gradle(Project: YOURPROJECT) and change the classpath inside dependencies {} to 'com.android.tools.build:gradle:2.3.3' . In repositories {} that is inside buildscript {} change google() to maven {url 'https://maven.google.com/' name 'Google' }. You should do this same thing to allprojects {} that is found just below dependencies {}.
Finally, open build.gradle(Module: app) and inside dependencies {} change the word "implementation" to "compile". Now sync your Gradle.
These changes will make the error you found, regarding the IDE version, to stop showing. You'll probably have other errors popping up that are related to sdk and dependencies versions. Just adjust the versioning of the sdk and dependencies to the ones that are used by your Android Studio 2.3. Some XML files may also show errors and you must manually correct those.
I have the Android studio 3.0 Canary preview and am able to build fine there. When I try to build on jenkins with gradlew I receive
Could not find com.android.databinding:baseLibrary:3.0.0-alpha8.
I thought maybe the google() repo wasn't working but you'd think that would error out itself so I replaced
google()
with
maven { url 'https://maven.google.com' }
and I still get the same error. The only reference that I have in my build.gradle for databinding is
android {
dataBinding.enabled = true
}
my gradle wrapper has a distribution url of
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip
does anyone have an Idea of what I'm doing wrong or let me know if you need more information.
Same error here.
It's because you use Android Studio Canary Version.
Build Tools are include in package directly:
android-studio\gradle\m2repository\com\android\tools\build\gradle\3.0.0-alpha9
Are you sure that version exists? Looking here it seems like it doesn't.
Keep in mind that 3.0.0-alpha8 (alpha9 as of now) is for classpath 'com.android.tools.build:gradle', and not necessarily other dependencies
You can use the local gradle like this:
i just switched to intellij and pretty new to android development.. I've been working on one app for 5 moth and now that i moved it to intellij android studio my options menus became invisible. I've been reading a lot and trying to catch up with newest features that are available now today.
By biggest pain is that im hitting this error ->
Failed to refresh Gradle project 'ActionBarCompat-ListPopupMenu' You are using Gradle version 1.8, which is not supported. Please use version 1.9. Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (
I did search on this problem and some pages suggesting changing classpath to soething like
build:gradle:0.7.+ but that doest help..
What am i doing wrong? All i need is just to make those examples from android to work..
Thanks
The Gradle wrapper file is at the path (project-root)/gradle/wrapper/gradle-wrapper.properties. The distributionUrl property is where you set the Gradle version; it's embedded in the URL:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip
First make sure you've updated to the newest Android SDK Build-tools version, the most current one is 19.0.3; if you haven't, then open the Android SDK manager and update.
Then look in the build.gradle file inside your project folder (not the one in the root folder). This first couple of lines should resemble something like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
Set the class path to com.android.tools.build:gradle:0.9.+.
Then further along in the same file:
android {
compileSdkVersion 18
buildToolsVersion "19.0.3"
...
}
Set buildToolsVersion to 19.0.3 (the newest version).
Make sure Android Studio syncs the Gradle file changes. If it doesn't, restart Android Studio and/or rebuild the project. Then you should be good to go.
I think i figured this out.. Big thanks to Scott and Jaap.
I did updateof my intellij to 0.5.2, also i installed 19.0.3 ( newest build tools).
On few of the existing projects i had to change distributionUrl to
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
After rebuilding the project it worked like a charm.
Just a note to say : Scorr Berba's reply was probably the correct one. Also I'm not sure 1.11 can be used - I used the wrapper (there is a lot of confusion here : the wrapper is the gradlew ["gradle*w*"rapper] to set the gradle used for my samples to 1.10 and you must set up your project to use the wrapper OR you can build from the command line e.g "./gradlew build".