I recently went back to an app in android studio that worked fine on Android Studio 2.3.3 but this morning when I was prompted to update to Studio 3.0 my module wont make. I have tried cleaning and rebuilding but when I try run it on my device the build fails and gives me this error:
Error:Execution failed for task ':app:javaPreCompileDebug'.
Annotation processors must be explicitly declared now. The following
dependencies on the compile classpath are found to contain annotation
processor. Please add them to the annotationProcessor configuration.
- androidannotations-4.0.0.jar (org.androidannotations:androidannotations:4.0.0)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
I have no clue about android annotations that is why I am asking here on SO.
Thanks!
After doing some research I was able to find this GitHub issue. This picture solved my problem!
Related
Recently I updated my Android Studio into 3.6.1 without any problems occurring, but as soon as the Gradle finished syncing, an error message shows in my Build and Event Log.
(Inside the "Build" message)
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
Could not resolve all artifacts for configuration ':classpath'.
org.gradle.internal.resolve.ModuleVersionResolveException: Could not
resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61.
org.gradle.internal.resolve.ModuleVersionResolveException: No cached
version of org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61 available
for offline mode.
(inside the "Event log")
Gradle sync failed: No cached version of org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61 available for offline mode.
I noticed that there's a "kotlin" (from the Event log) involved in the message, but I haven't used a single project with Kotlin yet.
I haven't seen any solutions that helped me so far, only saw old problems that were slightly the same as mine that's why I posted this question instead. Its the first time this error occurred to me, and also my first time asking a question.
Right now, I'm not able to run any of my projects in Android Studio because of this error. Please help!
-Thank you for answering in advance.
Check and disable the offline gradle and try again, Android Studio is muture enough to solve most of the problems now days. Try again after enabling the online gradle and click on sync again(eleghant icon with down arrow) to left of AVD icon in toolbar.
Try reinstalling android sdk maybe the problem is solved.
hello friends i am new to android studio(ver :3.6.1) and gradle(ver:6.0.3) i have just somehow installed it (means my gradle was not installing or taking time so i manually installed files in chrome and placed it in folder and everything is okay but due to version upgrade i am facing this issue) and when i used to sync it , it shows me error that the Deprecated Gradle features were used in this build, making it incompatible with
Gradle 7.0.Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings then i did same build with --warning-mode all and i got this message --Executing Gradle tasks as part of an undefined build has been deprecated. This will fail with an error in Gradle 7.0. Consult the upgrading guide for further in
formation: https://docs.gradle.org/6.3/userguide/upgrading_version_5.html#executing_gradle_without_a_settings_file_has_been_deprecated
afterthat i went to the given link and then i found this
Have A look to Image
i don't know how to write the setting.gradle or setting.gradle.kts file and where to save it i once tries to save it in my gradle home folder but it gave me another error that the method i used to do so is not known i have attached my gradle project build log screenshots
have a look to image
thank u i hope u will help me please give me suggestions and help me to do it 😞😞
No need to hurry - as long as you don't upgrade to Gradle 7.0 nothing bad will happen. And since Gradle 6.3 has been released quite recently the next release is at least 5 to 6 weeks away...
If your project is a simple project without subprojects, the settings.gradle file can be an empty file (though it needs to exist).
You must place it into the same directory as your build.gradle file.
You need more content in the settings.gradle file if you start creating multi-project builds. The documentation about multi-project builds is part of the gradle documentation (what a surpise!): https://guides.gradle.org/creating-multi-project-builds/
Detailed information about the allowed settings are available at https://docs.gradle.org/current/dsl/org.gradle.api.initialization.Settings.html
I should preface this by saying that I don't know much about programming or android app development at all. I am trying to get a program running to control my pool cover automatically. This program is fairly old, which I imagine is the reason for the issues. I have been following this guide to sign and bundle the APK. As soon as I clone the project from github, I am greeted with this:
ERROR: Could not determine the class-path for class com.android.tools.idea.gradle.project.sync.ng.SyncAction.
In addition to this, the "Generate Signed Bundle / APK button" is not available.
From what I can gather, this program uses Gradle 1.10.
Here is the complete output log that I got from android studio
I might have found a solution for your problem but being a project as old as this, you can have problems with library usages.
The reason you're seeing this error is, using info from this answer, because this project was written in Eclipse IDE. The answer says:
when Eclipse export a project to gradle, it use an old gradle plugin version that Android Studio doesn't support.
Following his instructions I changed my Gradle version to 2.3, but Android Studio showed some more errors asking me to upgrade my version to 3.3, as showed here in Project Structure (You can easily access this using Ctrl + Alt + Shift + S).
Notice that Android Studio also asked me to set my gradle plugin version to 2.3 on another error, that I did. You should be aware that I had to change my distributionUrl in gradle-wrapper.properties file, as you can see here
Lastly Android Studio demanded me to change buildToolsVersion because it couldn't make my app with original config. Also what gave me the most trouble was the runProgruard function that Studio said didn't exist. I found the solution in this answer. My app build.gradle ended like this.
PS: At EVERY step of changing this configurations I had to go to menu build->rebuild project and then use the gradle button "try again". Sometimes it might seems it is not working, but with patience you will get there.
I have tried all the possible solution available on stackoverflow. But I am getting the same error again and again. Not sure from where it's coming from.
I followed this thread. And updated the build.gradle file to
splits {
abi {
enable true
reset()
include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
universalApk false
}
}
This is the error I am getting
Installation failed with message INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
Till yesterday night this was working fine. But today it's ruining my day. Could some one please help me with this ?
I am not using additional application like genymotion or arc welder. I am getting this error on android emulator.
I tried running it on real device, but same issue.
Regards
Can't believe this error happened because of an apache library. I recently added few apache dependency in my project and then this error starts appearing. The line I added
implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'
And then after that struggling entire day. Finally I undo all my changes and find out this was happening because of the apache package.
I added this dependency in build.gradle and it works fine.
implementation group: 'commons-io', name: 'commons-io', version: '2.5'.
But not able to figured out how the apache packages interrupt emulator to work properly. Strange !
Posting this answer so that if someone could understand the reason behind the problem, please explain it to me as well :P
I have problem with resolving dependencies. Have you guys had similar issue? Any ideas?
thanks in advance
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'test'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find org.robovm:robovm-gradle-plugin:1.0.0-SNAPSHOT.
Searched in the following locations:
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/maven-metadata.xml
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.pom
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.jar
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/maven-metadata.xml
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.pom
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.jar
Required by: :test:unspecified
(I've added underscore in links to get it posted in here.)
it works when I uncheck iOS subproject... Have no idea how to fix it
I had the same problem when using a libGDX project with libGDX version 1.5.4.
In your build.gradle file look for something like:
classpath 'org.robovm:robovm-gradle-plugin:1.0.0-SNAPSHOT' and change it to: classpath 'org.robovm:robovm-gradle-plugin:1.0.0-beta-04'
Do the same for: roboVMVersion = '1.0.0-SNAPSHOT' and change it to: roboVMVersion = '1.0.0-beta-04'
This should work otherwise try changing both to: 1.0.0-beta-01.
After this it should ask you to sync your project, click sync now!
Hope this helps!
Here are some helpful links:
https://github.com/robovm/robovm-gradle-plugin#robovm-gradle-plugin
http://libgdx.badlogicgames.com/news.html
For those who are using the latest version of Android Studio 4.0.0, if your Generate fails in libGDX it says
FAILURE: Build failed with an exception.
Don't worry you need to downgrade Gradle version to 6.0 by dragging the file you created in libGDX into Android Studio, then going to Gradle Script> gradle-wrapper.properties
And change
distributionUrl = https : //services.gradle.org/distributions/gradle-6.3-zip.zip
change into
distributionUrl = https : //services.gradle.org/distributions/gradle-6.0-all.zip
Please note you will also need to install java jdk 8!
This worked for me, I had to spend a lot of time including uninstalling Android Studio but it didn't work at all. From above experience is how I got it solved very quickly and inexpensively!