Failure building Gradle - android-studio

I tried to a create new project through Google maps activity but my android studio keeps through an exception whenever I try build the gradle. Please any solution colleagues. PC... haven't written any code yet.
Here is the gradle message ....
Error:error: resource android:attr/fontVariationSettings not found.
Error:error: resource android:attr/ttcIndex not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Related

Azure Databricks - Library Installation Fails

I am running a job from a jar file in Azure Databricks. This jar has a dependency on azure-storage-file-share. Previously, there wasn't an issue installing this dependency using Maven within the Databricks UI. Now, I get failure with this error message:
Run result unavailable: job failed with error message Library installation failed for library due to user error for maven { coordinates: "com.azure:azure-storage-file-share:12.16.2" } Error messages: Library installation attempted on the driver node of cluster 0131-144423-r1g81134 and failed. Please refer to the following error message to fix the library or contact Databricks support. Error Code: DRIVER_LIBRARY_INSTALLATION_FAILURE. Error Message: java.util.concurrent.ExecutionException: java.io.FileNotFoundException: File file:/local_disk0/tmp/clusterWideResolutionDir/maven/ivy/jars/io.netty_netty-transport-native-kqueue-4.1.86.Final.jar does not exist
To try to work around this, I manually installed this netty library (and several others) as well. I can see in the logs that it was able to download the jar successfully:
downloading https://maven-central.storage-download.googleapis.com/maven2/io/netty/netty-transport-native-kqueue/4.1.86.Final/netty-transport-native-kqueue-4.1.86.Final-osx-x86_64.jar ... [SUCCESSFUL ] io.netty#netty-transport-native-kqueue;4.1.86.Final!netty-transport-native-kqueue.jar (202ms)
However, it still fails. This is error message is in the same log after the one above:
23/01/31 14:50:09 WARN LibraryState: [Thread 137] Failed to install library maven;azure-storage-file-share;com.azure;12.16.2;; java.util.concurrent.ExecutionException: java.io.FileNotFoundException: File file:/local_disk0/tmp/clusterWideResolutionDir/maven/ivy/jars/io.netty_netty-transport-native-kqueue-4.1.86.Final.jar does not exist

SSL problems running azure-webapp-maven-plugin config

when running:
mvn com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config
I end up with
[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config (default-cli) on project storingen-api: Max retries 0 times exceeded. Error Details: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config (default-cli) on project storingen-api: Max retries 0 times exceeded. Error Details: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Clearly this is a certificate problem that cannot be found. I have however no clue what certificate is needed nor in which keystore it needs to be. I suppose in the cacerts of my java distribution but it's not clear in any way.
Does anyone know which cert and where to put it ?
I just running into the same problem following Azure Learn Java Azure
Basically, this error ocurred because Java is trying to connect with your Azure Subscription at Azure Console. I saw the origin of this problem executing Maven command with -X. The log trace can be visualized over here, like this:
mvn com.microsoft.azure:azure-webapp-maven-plugin:1.12.0:config -X
What I did to solve:
I tried inserting Azure certifications inside Java cacerts - following the explanation here. But it didn't change or solved the problem.
I searched for a new one version of azure-webapp-maven-plugin. Nowadays, the version is 2.3.0. You can check at Maven repository the last version. It fixed my problem and no more throws the error caused by Java.
before: mvn com.microsoft.azure:azure-webapp-maven-plugin:1.12.0:config
after (I think so, that version fixes the problem): mvn com.microsoft.azure:azure-webapp-maven-plugin:2.3.0:config
Thanks

Can't run Flutter app error "FAILURE: Build failed with an exception."

This app is from Github
"https://github.com/wiltonribeiro/grocery_shop_flutter"
I was wondering if someone else is able to run it because i get some execution errors and I cant fix them.
I would appreciate it if someone can fix the issue
Cheers!
Edit: I appreciate your responses
the error looks like this:
"
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr/fontVariationSettings not found.
O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:87: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 19s
Exception: Gradle task assembleDebug failed with exit code 1
""
I tried to compile it to android and i could fix this error by changing compileSdkVersion to 28
However the solution is applicable if you follow the instruction on https://github.com/wiltonribeiro/grocery_shop_flutter
Yes, it works perfectly fine in the latest version.product picture (only for ios phone running).
No need to worry>>> Only on terminal, It still tells an error message "Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration"
The output looks like this!!!

Android Studio: Error after deleting file

I got this error:
Error:Execution failed for task ':app:generateDebugBuildConfig'. > java.io.IOException: Could not delete path 'C:\Users\Guest Account\Documents\COLLEGE\FYP\7. Iteration 4\fridge iteration 4\app\build\generated\source\buildConfig\debug\com'.
and saw 'could not delete path' so I decided to follow the path and delete the path. When I reran the app I got seven new errors:
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:failed linking file resources.
Error:attribute 'com.virtual.fridge:layout_behavior' not found.
Error:error: attribute 'com.virtual.fridge:layout_behavior' not found.
In my even log I have two new messages:
* daemon not running; starting now at tcp:5037
21:10 * daemon started successfully
I am going to presume this is down to deleting that file.. is there anything I can do? Really new to android studio so I appreciate any help. Please tell me what other information I shoudl provide
I cleaned the project and built it and it worked

Android Studio: How to remove or disable javadoc generation from project build?

A third party SDK (Facebook) causes the build of my Android App to fail because its javadocs can not be created! This is one of the shiny new features of Android Studio 1.2 RC0, as everything worked perfectly before the update.
Here's the exact error message:
22:39:55.176 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
22:39:55.176 [ERROR] [org.gradle.BuildExceptionReporter]
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':facebook-sdk:androidJavadocs'.
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] > Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/..../project/libraries/facebook-android-sdk/facebook/build/tmp/androidJavadocs/javadoc.options'
Now I don't care about the Facebook javadocs at all! So what do I have to do to remove the javadoc generation of the Facebook SDK from the build? I.e. How can I get the project to compile and execute again?
Any advice is welcome, thank you!
Found the solution here:
https://bitbucket.org/hvisser/android-apt/issue/35/prevent-facebook-module-to-compile
I am past this line:tasks.findByPath(":facebook:androidJavadocs").enabled = false in my build.gradle file
Add Gradle by module:
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}

Resources