Cannot run an android code on Processing - android

When I try to run an android code in Processing 2.2.1 Android mode I get the following message:
Error from inside the Android tools, check the console.
And then:
java.io.FileNotFoundException: C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png (The system cannot locate the resource specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at processing.app.Base.copyFile(Base.java:2698)
at processing.mode.android.AndroidBuild.writeRes(AndroidBuild.java:807)
at processing.mode.android.AndroidBuild.createProject(AndroidBuild.java:169)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:91)
at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:227)
at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:513)
BUILD FAILED
C:\Users\USER\AppData\Local\Temp\android9132488509980035650sketch\build.xml:9: The entity name must immediately follow the '&' in the entity reference.
Total time: 0 seconds
What can I do to solve it? I am a total beginner so please try to be as specific and clear as possible.
Thanks!

Program wants this file "C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png" and cannot find it.

Related

Can't compile React Native Android APK, fails on bundleReleaseJsAndAssets/metro-bundler

I am getting the following errors compiling on Android, either from the command line or via Android Studio:
* Exception is:
org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check
Caused by: java.io.FileNotFoundException: /Users/mikem/react/myapp/metro-bundler-symbolicate117923-49160-k3nnyf.htls935wmi.sock (Operation not supported on socket)
I have cleared out node_module and reset the caches, manually generated the bundle but this error continues.
Any help would be appreciated.
In case anybody else runs into this - the link metro-bundler-symbolicate117923-49160-k3nnyf.htls935wmi.sock did exist in that directory but had a root owner (perhaps could have been caused when I was trying to fix other issues). Deleting the link fixed the problem.

The "XamarinBuildAndroidAarProguardConfigs" task failed unexpectedly

I am trying to implement firebase with xamarin.android but after downloading some nugat packages I started getting different errors and the latest one is as below:
Severity Code Description Project File Line Suppression State
Error The "XamarinBuildAndroidAarProguardConfigs" task failed unexpectedly.
System.IO.InvalidDataException: Central Directory corrupt. ---> System.IO.IOException: An attempt was made to move the file pointer before the beginning of the file.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin)
at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin)
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
--- End of inner exception stack trace ---
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at Xamarin.Build.Download.XamarinBuildAndroidAarProguardConfigs.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() FireBaseSolution
android target framework : 25
Some of installed references :
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat
Xamarin.GooglePlayServices.Base
Xamarin.Firebase.Messaging
Please guide me how to resolve it.
Thanks
For me the solution was in downgrading version nuget package "Xamarin.Build.Download" to version 4.4
Answering on an old question, but this may help others if they ended up in the same situation as me (not being allowed to modify the version of Xamarin.Build.Download), here's how I fixed it:
I deleted the folders for C:\Users(username)\AppData\Local\Xamarin and C:\Users(username)\AppData\Local\XamarinBuildDownloadCache and rebuilt my solution.
What I found was that evening using the NuGet cache clearing tool in Visual Studio, these directories remained untouched.
I can only surmise that this issue can also be caused by file corruption (I might have had a faulty network connection), and the DownloadCahe blocked attempting to get the "clean" files.
On MacOS I had to wipe all folders concerning Xamarin in "~/Library/Caches". Afterwards it would build fine.

Running Android Lint has encountered a... Failed. java.lang.NullPointerException

I just added Google Play Service Library to my project and when I am making a modification in one of my project files I am keep getting an error dialog from eclipse:
'Running Android Lint' has encountered a problem. Failed.
So, I enabled Error Log (Window -> Show View -> Error Log) tab and I found a warning and an error line:
Error:
Failed: com.android.ide.eclipse.adt
java.lang.NullPointerException
at com.android.tools.lint.checks.ApiDetector$ApiVisitor.checkField(ApiDetector.java:1416)
at com.android.tools.lint.checks.ApiDetector$ApiVisitor.visitSelect(ApiDetector.java:1277)
at com.android.tools.lint.client.api.JavaVisitor$DispatchVisitor.visitSelect(JavaVisitor.java:904)
at com.android.tools.lint.client.api.JavaVisitor$DelegatingJavaVisitor.visitSelect(JavaVisitor.java:1147)
at lombok.ast.Select.accept(Select.java:91)
at lombok.ast.MethodInvocation.accept(MethodInvocation.java:121)
at lombok.ast.ExpressionStatement.accept(ExpressionStatement.java:63)
at lombok.ast.Block.accept(Block.java:106)
at lombok.ast.MethodDeclaration.accept(MethodDeclaration.java:240)
at lombok.ast.NormalTypeBody.accept(NormalTypeBody.java:57)
at lombok.ast.ClassDeclaration.accept(ClassDeclaration.java:239)
at lombok.ast.CompilationUnit.accept(CompilationUnit.java:83)
at com.android.tools.lint.client.api.JavaVisitor.visitFile(JavaVisitor.java:219)
at com.android.tools.lint.client.api.LintDriver.checkIndividualJavaFiles(LintDriver.java:1624)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:993)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:869)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:442)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:363)
at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:163)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
and a Warning:
Fatal Error: No API database found at null
An exception stack trace is not available.
My application is working, but it is annoying to close the dialog each time I make an edit and save.
This is a workaround (not exactly the solution). In Window > Preferences > Android > Lint Error Checking, uncheck "When saving files check for errors".
EDIT:
Please use the above steps only if you don't care about linting your code. These steps are for turning off Lint checking, not correcting the reported lint errors.
I would suggest for you to check on the warnings on your project. Resolving them one by one may get rid of the startup error.

Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. I went through the Google guide to building a simple UI, but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project):
Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)
I have never developed an android app before, so I don't know how common this is. I did a search for this error and found no one encountering the same problem.
I tried the solution from Abhan and I get a new error message:
Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore.
On linux or OS X, the default location is ~/.android. On windows, it's in C:\Documents and Settings\.android\ or C:\Users\.android.

Android SDK can't fetch XML and ArrayIndexOutOfBounds Exception in Project Run

I have two problems with android SDK.The first is that after installing sdk manager I can not install new plateform,tools,sysimage etc online it gives following error:
Fetching
Validate XML
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetched Add-ons List successfully
Fetching URL:
Validate XML:
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetching URL:
Validate XML:
Failed to fetch URL , reason: addon.xml
Done loading packages.
I tried force https.
http in place of https.
I am using DSL for internet and not using any proxy to connect to internet.
For the sake of removing this problem I also tried proxy server but all in vain.
So I installed all the updates offline APD v2 helped me with downloading.
I used both Eclipse and Netbeans for dev.Everything worked fine,until I tried to run a new project and even sample project.
On Eclipse it gave me following error:
Same problem was with netbeans:
Creating redLight-debug-unaligned.apk and signing it with a debug key...
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.:
com.android.sdklib.build.ApkCreationException: java.lang.ArrayIndexOutOfBoundsException: 13
I am new in android app development and trying to rebuild my Java Application for android platform,but I am stuck in first step.
Please help me here.
Solution for your first problem is simple : Line -१:-१, it shows u r language for windows os is set to hindi (IN_HI).
Goto Control panel region & language option change language to English for all formats.
Restart machine & fetch xml.
I am also facing second problem solution to that is not yet found
check this: https://groups.google.com/forum/?fromgroups#!topic/android-developers/BvO5g6RMamo
Also I have updated bug in Android issues :
http://code.google.com/p/android/issues/detail?id=28824

Categories

Resources