AppDistribution Gradle plugin with Gradle 7 - android

I am using Android Gradle Plugin version 7.0.0-alpha14 and Gradle version 7.0 and when I try to upload the app to app distribution through the Gradle plugin version 2.1.0 it fails on a task app:appDistributionUploadDebug with an error
> Task :app:appDistributionUploadDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':app:appDistributionUploadDebug' (type 'UploadDistributionTask').
- Type 'UploadDistributionTask' property 'COMMAND_LINE_PREFIX' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as #Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
- Type 'UploadDistributionTask' property 'appDistributionProperties' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as #Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
I suppose the plugin is not compatible with Gradle 7 but is it a known issue and is there some workaround? Thanks

New version of plugin 2.1.1 was released that fixes this issue.
classpath 'com.google.firebase:firebase-appdistribution-gradle:2.1.1'

Goto project's build.gradle file
Add below line into dependencies block :-
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'

Related

Android Studio Error: During launch : com.android.build.gradle.internal.res.ResourceCompilerRunnable

Tried to launch my app and get this error. I'm going crazy with new gradle 8.
How can i fix it?
I've made this command:
./gradlew :MatchUp:dependencies --warning-mode all
And then these are answers:
Starting a Gradle Daemon, 3 incompatible and 3 stopped Daemons could not be reused, use --status for details
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.3.3/userguide/upgrading_version_6.html#jcenter_deprecation
at settings_1i0yjjkfvqy3y2on3vxaqibu6$_run_closure1$_closure2.doCall(/Users/cristiancapannini/Desktop/COLAN_WORKS/Android/MatchUp/settings.gradle:8)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
FAILURE: Build failed with an exception.
Where:
Build file '/Users/cristiancapannini/Desktop/COLAN_WORKS/Android/MatchUp/app/build.gradle' line: 2
What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
Failed to apply plugin 'com.android.internal.application'.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Your current JDK is located in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
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.
How can i fix it?
Obviously it needs to be fixed in order to still maintain the backward compatibility of the app. Thanks
with regard
Files gradle
https://drive.google.com/drive/folders/1YEFZI3W9Sn3p6urwHm2eK-Hx8wNHmJeC?usp=sharing
Cristian

Flutter Android build not generating in Mac

In Mac, I've setup Flutter in Android studio. When I'm running project it gives me error
* What went wrong:
Execution failed for task ':location:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
I'm using all latest versions of Flutter, Kotlin, Gradle etc.
You need to equalize kotlin version in first row which is ext.kotlin_version = '1.6.10' to according to classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" of underlined $kotlin_version
After this, the problem will solve...
Actually I found a solution for my problem. There are 2 dependency defined in .yaml file 1. geo_location and 2. location.
After removing the location dependency from .yaml file and run command flutter pub get I can successfully build android build from Mac. This solution might not be global but solution of my problem I found this.
Thank you!
Happy coding.

Could not find com.android.tools.build:gradle:6.4.1

I faced the problem, more correct in gradle, when I enter the command - npx react-native run-android into the console - it gives me the following error :
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'Da'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:6.4.1.
Searched in the following locations>
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom -https://jcenter.bintray.com/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom
Initially - the problem was incompatibility between gradle and android versions, but after i changed version of gradle and terminal automatically download new version into directory, first error disappeared, but i got another (current problem). I had try some advice before asking question in StackOverFlow, but they didn't work. Here some characteristics :
React-Native Doctor image
Gradle code : gradle.properties ,
gradle-wrapper.properties
Gradle Directory : Here
Path variables :Here
I appreciate all help (I think, that issue is in PATH, but not sure). By the way - does anyone know, how to add pictures without link?
You are confusing gradle with the gradle plugin.
The gradle plugin 6.4.1 doesn't exist.
Use the latest stable version:
classpath 'com.android.tools.build:gradle:4.2.2'
Check also the compatibility with the gradle version:
Plugin version Required Gradle version
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+

What is navigation.json in Android Studio 4.1?

I just tried out Android Studio 4.1 today. I started the Android Studio and created empty activity and I run it using the android virtual device. Then it was failed and this error is shown:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
> File 'E:\Project\AndroidLayout\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
When I rebuild the project, the error message is shown here:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: E:\Project\AndroidLayout\app\build\intermediates\navigation_json\debug\navigation.json (The system cannot find the path specified)
Note that this is fresh install and fresh project without any modification in the code.
UPDATE 1:
Youtube: https://www.youtube.com/watch?v=g4w_NOA_UVQ
Bug Report: https://issuetracker.google.com/issues/170720311
UPDATE 2:
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working.
So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
I find a temporary solution:
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working. So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
In order to downgrade, just go to File -> Project Structure.
Had same issue. Moving project files to ntfs drive fixed it.
Downgrading the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working; works for me as well. Now app is no longer experiencing building errors.Thanks.
Error message was :
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
File 'F:\NietsPastApp\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
Thanks for help, downgrade it's ok. just for other who search the file :
gradle 4.0.2 change here : /build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
gradle 6.4.1 : gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
File -> Project Structure. reduce your build tools version to 29
i tried it's work
In my case and for kotlin I have downgraded kotlin version from 1.4.32 to 1.4.31

Cannot create tasks to upload Proguard Mapping File.java.lang.IllegalStateException: Resolving configuration 'androidTestAnnotationProcessor'

Upgraded to Android Studio 3.0 canary 3 and with it gradle-4.0-milestone-1-all Due to the new way of evaluating dependencies the current plugin used in https://firebase.google.com/docs/crash/android#uploading_proguard_mapping_files_with_gradle no longer works, running the task:
$ gradlew app:firebaseUploadReleaseProguardMapping
Yields an error:
Cannot create tasks to upload Proguard Mapping
File.java.lang.IllegalStateException: Resolving configuration
'androidTestAnnotationProcessor' directly is not allowed
Any suggestions to make this work?
Updates from - groups.google.com/forum/#!topic/firebase-talk/JqnlnGK2ddY
Change from
classpath('com.google.firebase:firebase-plugins:1.1.0') {
to
classpath('com.google.firebase:firebase-plugins:1.1.0-alpha1') {
classpath 'com.google.firebase:firebase-plugins:1.1.5' fixes the issue.
Ref: https://firebase.google.com/docs/crash/android#known_issue

Categories

Resources