I'm unable to run my code in any of my devices. It is giving out an error:
org.gradle.api.UncheckedIOException:
Failed to capture snapshot of input files for task ':networkinglib:javaPreCompileDebug' property.
What should be the issue if anyone has come across this?
I've already tried all the solutions found in stack overflow and other build variable changes, but doesn't seems to fix the issue.
Related
I'm currently creating an application with Android Studio and Kotlin.
This morning, when I tried to run the app on the emulator and my phone, I got an error but what I don't understand it's I barely change the code : I just added a textview (tried to delete it but I still got the error. I tried to investigate and do think but none of them worked. I still don't really understand the error, could you help me fix it ?
Here the error :
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Caused by: com.android.aaptcompiler.ResourceCompilationException: Resource compilation failed. Check logs for details.
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:126)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable$Companion.compileSingleResource(ResourceCompilerRunnable.kt:34)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable.run(ResourceCompilerRunnable.kt:15)
at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
... 3 more
Caused by: java.lang.NullPointerException
at com.android.aaptcompiler.TableExtractor.flattenXmlSubTree(TableExtractor.kt:851)
at com.android.aaptcompiler.TableExtractor.parseXml(TableExtractor.kt:516)
at com.android.aaptcompiler.TableExtractor.parseArrayImpl(TableExtractor.kt:1300)
at com.android.aaptcompiler.TableExtractor.parseStringArray(TableExtractor.kt:1243)
at com.android.aaptcompiler.TableExtractor.access$parseStringArray(TableExtractor.kt:146)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor.extractResource(TableExtractor.kt:458)
at com.android.aaptcompiler.TableExtractor.extractResourceValues(TableExtractor.kt:267)
at com.android.aaptcompiler.TableExtractor.extract(TableExtractor.kt:182)
at com.android.aaptcompiler.ResourceCompiler.compileTable(ResourceCompiler.kt:186)
at com.android.aaptcompiler.ResourceCompiler.access$compileTable(ResourceCompiler.kt:1)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:123)
... 29 more
Thanks a lot
EDIT :
So, I've searched a lot, tried many things but none of them worked. Because my project is still small, I created a new project and copy/paste all my code and I this new project everything work and I don't have any error anymore.
Good luck if you encounter the same error.
Just had this error myself and after awhile managed to find the issue, I had strings within array-lists located in my strings.xml, some of my strings included apostrophes, for instance in don't won't can't.
Removing these allowed me to build my project again.
The solution that worked for me is locate the String.xml file. Delete the unused Strings I meant the strings that didnt had any reference in arrayList file.
Make sure gradle offline mode is not enabled.
Then do file->invalidate
then click invalidate and restart.
This should solve the issue
Is anyone who is using Raygun in their Android apps seeing this error exception:
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/conn/util/InetAddressUtils;
at main.java.com.mindscapehq.android.raygun4android.messages.NetworkInfo.readIPAddress(SourceFile:117)
at main.java.com.mindscapehq.android.raygun4android.messages.NetworkInfo.<init>(SourceFile:20)
at main.java.com.mindscapehq.android.raygun4android.messages.RaygunMessageDetails.setNetworkInfo(SourceFile:61)
at main.java.com.mindscapehq.android.raygun4android.RaygunMessageBuilder.setNetworkInfo(SourceFile:81)
at main.java.com.mindscapehq.android.raygun4android.RaygunClient.buildMessage(SourceFile:508)
at main.java.com.mindscapehq.android.raygun4android.RaygunClient.send(SourceFile:221)
This exception is very intermittent, but when it does happen, it always occurs when the app calls RaygunClient.send(...). I'm using Raygun in my app to report error conditions such as a failed webservice call, however, when I report this to Raygun it crashes my app!
The release of v3.0.6 includes fixes that address the problems seen with InetAddressUtils NoClassDefFoundError exceptions. Please update to release v3.0.6 and let us know if the problems persist.
Please see our documentation on how to update. https://raygun.com/documentation/language-guides/android/crash-reporting/installation/
Regards,
Mitchell.
"Cause: invalid code lengths set" error. The run tasks ended at App:packageDebug. From the long list of things, three under compiler are more informative I guess:
org.gradle.tooling.BuildException: invalid code lengths set
java.util.zip.ZipException: invalid code lengths set
java.lang.IllegalStateException: Still waiting to inspect output APK's res/raw/shape_predictor_68_face_landmarks.dat
On the right side there was: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageDebug'.
I searched all over the places and tried everything I could find, but it did not work. Also, I cleaned the cache and restarted, I tried different emulator and devices. I also tried different project settings and structure settings. I also noticed that a very similar post was not answered: build failed because of "org.gradle.tooling.BuildException: invalid code lengths set"
I have been trying to port my first iOS app to Android with apportable.
I have solved alot of warnings and errors but cannot get rid of this last one.
The App I made is a fitness application for jogging so it uses CoreLocation.
Everything looks good when I run apportable now except this last error:
Build/android-armeabi-debug/com.apptonix.easyrunner/testTabbedWithCore/libtestTabbedWithCore.a(DetailViewController.m.o):/Users/peterbodlund/Documents/xcodeprojects/Training/inlamning5/testTabbedWithCore/testTabbedWithCore/DetailViewController.m:function L_OBJC_CLASSLIST_REFERENCES_$_114: error: undefined reference to 'OBJC_CLASS_$_MKPinAnnotationView'
scons: * [Build/android-armeabi-debug/EasyRunner/apk/lib/armeabi/libverde.so] Error 1
scons: building terminated because of errors.
Exception AttributeError: "'NoneType' object has no attribute 'pack'" in > ignored
Usually this is an indicator that there were link errors. Check your output higher up and look for missing symbol errors.
The build log is confusing because the build is parallel by default.
Add the option -j1 to cause the build to stop immediately after the first error.
I recently added some .gifs to my /drawable so that I can use them with buttons. This worked fine (no errors). Now, when I go to rebuild/run my application, I get the following error:
Error: Gradle: Execution failed for task ':MyProject:mergeDebugResources'. > Index: 0
I'm not sure how to fix this (and there appears to be no other similar issues that I could find online.
Edit: Now it's the same error, but it also says (at the end of the first error)
Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed. See output
Okay, I fixed the issue. It was quite weird.
A) I had some capital letters in my res/drawables folder. Not too weird -- I can see how that would remove the first error.
B) Then, however, a lot of values in my main activity file became undefined. I had to manually import 'com.myapp.R'. Now that was weird.
Fortunately, everything is now working.
I hope that if anyone gets the same errors as me, that this response can help them.