Bryan L
05/03/2021, 5:27 PMDay 50
• Fixed several issues with Gradle (see thread)
• Started a Shopping List App that focuses on TDD
Self-Comment
• The gradle issues are becoming easier to fix thanks to them following the same pattern. Although I've yet to experience this many issues until I started to dive into Testing. I wonder if it's because I'm using AS Arctic Fox Canary 15 instead of an AS stable version. I was having similar issues when I attempted AS 4.2...
• Half way to the 100 day mark! I'm going to have to pick up the pace after the last 10 days of progress 👀🎉:kotlin-intensifies::android-dance:
Goals Tomorrow
• Continue Testing
• Possibly do this problem (random easy on Leetcode)packagingOptions {
exclude("META-INF/*.")
}
packagingOptions {
resources.excludes.add("META-INF/*.")
}
Warning: Mapping new ns <http://schemas.android.com/repository/android/common/02> to old ns <http://schemas.android.com/repository/android/common/01>
Warning: Mapping new ns <http://schemas.android.com/repository/android/generic/02> to old ns <http://schemas.android.com/repository/android/generic/01>
Warning: Mapping new ns <http://schemas.android.com/sdk/android/repo/addon2/02> to old ns <http://schemas.android.com/sdk/android/repo/addon2/01>
Warning: Mapping new ns <http://schemas.android.com/sdk/android/repo/repository2/02> to old ns <http://schemas.android.com/sdk/android/repo/repository2/01>
Warning: Mapping new ns <http://schemas.android.com/sdk/android/repo/sys-img2/02> to old ns <http://schemas.android.com/sdk/android/repo/sys-img2/01>
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Failed to query the value of task ':app:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
> Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\code\Codelabs\ShoppingListTesting\app\build\generated\ap_generated_sources\debug\out)) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@1d0761dd) before task ':app:compileDebugJavaWithJavac' has completed is not supported
....
Fixed replacing
classpath "com.android.tools.build:gradle:4.0.2"
with
classpath 'com.android.tools.build:gradle:7.0.0-alpha15'
I realized I'm using Arctic Fox Canary 15, while the tutorial is probably made with the stable version of Android Studio 😅* What went wrong:
Execution failed for task ':app:mergeDebugAndroidTestJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'win32-x86/attach_hotspot_windows.dll' from inputs:
- C:\Users\bryan\.gradle\caches\transforms-3\8505bba1d18479bad5612129dfae9c3b\transformed\jetified-kotlinx-coroutines-debug-1.4.3.jar
- C:\Users\bryan\.gradle\caches\transforms-3\eb4647ddf36e5a464415724c18c3b59c\transformed\jetified-byte-buddy-agent-1.10.20.jar
Adding a packagingOptions block may help, please refer to
<https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html>
for more information
added
packagingOptions {
exclude "**/attach_hotspot_windows.dll"
exclude "META-INF/licenses/**"
exclude "META-INF/AL2.0"
exclude "META-INF/LGPL2.1"
}
Did the trick to solve thisJungIn Choi
05/06/2021, 12:01 PM