Everything was woing Great, getting ready to test APK on diferent devices, but now, when i try to build, gave me this error:
Executing tasks: [:app:assembleDebug] in project C:\Users\Diego\Desktop\Kaiser
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:processDebugGoogleServices UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":11}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":31}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":25}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":42}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":9}}],"original":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) not found.\n ","tool":"AAPT"}
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.
C:\Users\Diego\Desktop\Kaiser\app\src\main\res\layout\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) not found.
* 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 9s
8 actionable tasks: 1 executed, 7 up-to-date
i've allready try "Clean & Rebuild Project", "Invalidate Cache and Restart", "Deleting the cache folder under .gradle" "org.gradle.jvmargs=-Xmx4608m on the Grade.Property", "Advanved profiling is Disable"
I'm out of ideas (Except, maybe to burn the entire building down.. :( )
You have to open all your xml files and see if there are any errors. Fix the errors then run again. It took my hours to figure it out.
Related
I started working with a flutter project, and as a beginner, I tried to run the default code given by the flutter team. But I keep getting the error as given below.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\krish.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\krish.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\krish.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\krish.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\krish.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
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 7s Exception: Gradle task assembleDebug failed with
exit code 1
It would be of great help if you could help me out. Thanks in advance.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
> Connection reset
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
> Could not get resource 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'.
> Connection reset
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 22m 42s
Exception: Gradle task assembleDebug failed with exit code 1
FAILURE: Build failed with an exception.
Just updated flutter to 1.5.4-hotfix.2
and now my project doesnt compile but my co-worker had no problems with same version
CONSOLE OUTPUT
Launching lib\main.dart on SM G955F in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/fontVariationSettings not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.0.aar\9a8530dc700588f390ca440a65237576\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\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 gradle url
BUILD FAILED in 5s
Finished with error: Gradle task assembleDebug failed with exit code 1
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See [googleHref][2] for more information on the problem and how to fix it.
Execute the flutter clean command in your project, to erase everything in cache of previous compilations
Executing tasks: [clean, :app:assembleDebug]
Configure project :app
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild
Task :app:compileDebugAidl
Task :app:compileDebugRenderscript
Task :app:checkDebugManifest
Task :app:generateDebugBuildConfig
Task :app:prepareLintJar UP-TO-DATE
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:processDebugGoogleServices
Parsing json file: D:\ANDROID APP SOURCE CODE\HD WALLPAPERS\codecanyon-7054658-hd-wallpaper-with-material-design\HD Wallpaper Package\Source Code\HDWallpaperNew\app\google-services.json
D:\ANDROID APP SOURCE CODE\HD WALLPAPERS\codecanyon-7054658-hd-wallpaper-with-material-design\HD Wallpaper Package\Source Code\HDWallpaperNew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-sw600dp-v13\values-sw600dp-v13.xml: error: file not found.
Task :app:mergeDebugResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
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 8s
12 actionable tasks: 10 executed, 2 up-to-date
I did not find Exact issue I already try previous answer of others but non of any solve my issue !
make sure that you have google-services.json in your android\app folder.
A test project is created in Android Studio. Then immediately clicked on run or debug.
The following message pos up:
'Execution failed for task ':app:generateDebugBuildConfig'.
Failed to create D:\Project\Android\Asd\app\build\source\buildConfig\debug\com1\example\app`
One thing I found that Java folder is empty. But in the tutorial a default file is created by the IDE. Unfortunately here it is missing. If more information is needed please post it here.
What I am missing, please help me.
***Sorry for the trouble. In response to the message:
Executing tasks: [:app:generateDebugSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> Failed to create D:\Project\Android\Asd\app\build\source\buildConfig\debug\com1\example\app
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.994 secs
This appears to be because Windows won't let you name folders COM1, COM2, etc. I had to navigate to app > manifests > AndroidManifest.xml. Then, I edited the AndroidManifest.xml file package value to take out the number after 'com'. So for you, change package=com1... to package=com..., then try re-compiling (Build > Make Project, or CTRL + F9.)
Example of the AndroidManifest.xml file that you need to edit:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourdomain.httpssubdomain.yourappname >
List of forbidden names:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.
Source: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396