Android path in the Fileprovider is not recognised - android

I get this following exception for xlsx, msg and xml
Caused by java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/myadress/aFile.xlsx
at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:744)
I saw several issues related but cannot find where is the error
I am reading the official documentation but do not get where can be the bug because do not understand where is going wrong

Failed to find configured root that contains /data/data/myadress/aFile.xlsx
You should serve from the files directory:
/data/data/<packagename>/files/aFile.xlsx

Related

Error in Xamarin Studio

When I create an android application it reports the following error (formatted for readability):
C:\Program Files\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2):
Error MSB6004: The specified task executable location
"C:\Users\Rashid\AppData\Local\Android\android-sdk\\tools\zipalign.exe"
is invalid. (MSB6004) (newTest)
A search for the error ID, MSB6004, suggests that the fix for this error is to update Xarmin to at least version 3.1.223. The linked question also discusses copying files in C:\Program Files or wherever Xarmin is installed, but in theory that should not be necessary.

Run projects from androidviews

I am trying to run the sample project from customviews but facing some problems. i am not able to run any project from the site. Each time getting different type of error. I also searched in the net for the solution but failed to figure out the solution. May be i am facing a general problem for all projects and if i solve one i may be able to solve the others.
In ActionbarPullRequest library i am getting :
Description Resource Path Location Type SmoothProgressBar cannot be resolved to a type DefaultHeaderTransformer.java /library_ActionbarPulltoRefresh/src/uk/co/senab/actionbarpulltorefresh/library line
57 Java Problem
In StackBlurDemo i am getting this error :
Description Resource Path Location Type toggleButtonMode cannot be resolved or is not a field MainActivity.java /StackBlurDemo/src/com/example/stackblurdemo line 30 Java Problem

"Failed to read SDK values" error

When Eclipse opens, the Error Log pops up and gives me this error.
java.io.FileNotFoundException: C:\Users\Jess D630\Desktop\School\DCMST\Directed Study\eclipse\platforms\android-7\data\service_actions.txt (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.collectValues(AndroidTargetParser.java:403)
at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.collectIntentFilterActionsAndCategories(AndroidTargetParser.java:388)
at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.run(AndroidTargetParser.java:120)
at com.android.ide.eclipse.adt.internal.sdk.Sdk$5.run(Sdk.java:559)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I know that I need the service_actions.txt file but I cannot find it online anywhere.
I solved a similar problem by finding the source code online for a different file.
Does anyone have the code for it?
That file is referred by the Android SDK. Your SDK and Eclipse configuration is incorrect, that's why you are getting this error. Please refer this guide for setup instructions:
https://developer.android.com/sdk/installing/index.html

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

File->New->Android Project->Create Project From Existing Code AndroidManifest.xml (The system cannot find the file specified)

I am trying to look at Android examples from Apress and Wiley's books.
Errors occur when looking at code from both companies.
ie. Apress Beginning Android http://www.apress.com/downloadable/download/sample/sample_id/584/
Extracted Chapter7 to Z:\new\Chapter7
FYI Android SDK location Z:\eclipse\Android\android-sdk
File->New->Android Project->Create Project From Existing Code
Selected Z:\new\Chapter7
Build Target Android 2.2
AM able to get HelloWorld and applications typed in to work with current Eclipse setup to run on hardware and simulators, but when attempting to look at others sorce code am getting errors.
When opening source code from either companies books I get similar errors
[2011-07-27 02:26:41 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read Z:\eclipse\Android\android-sdk\samples\android-8\AndroidManifest.xml: java.io.FileNotFoundException: Z:\eclipse\Android\android-sdk\samples\android-8\AndroidManifest.xml (The system cannot find the file specified)
[2011-07-27 02:26:41 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read Z:\eclipse\Android\android-sdk\samples\android-8\AndroidManifest.xml: java.io.FileNotFoundException: Z:\eclipse\Android\android-sdk\samples\android-8\AndroidManifest.xml (The system cannot find the file specified)
[2011-07-27 02:26:45 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read Z:\new\AndroidManifest.xml: java.io.FileNotFoundException: Z:\new\AndroidManifest.xml (The system cannot find the file specified)
[2011-07-27 02:30:41 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read Z:\new\AndroidManifest.xml: java.io.FileNotFoundException: Z:\new\AndroidManifest.xml (The system cannot find the file specified)
Eclipse is trying to create projects from folders Z:\new\ and Z:\eclipse\Android\android\samples\android-8, which I can assure you is wrong. Is there another project you are making in which you are creating from those two paths? I know for a fact that Z:\eclipse\Android\android\samples\android-8 has multiple projects inside and you need to specify the exact project.
For instance, inside android-8, I see that there is ApiDemos and BackupRestore, you need to select those in order for Eclipse to find the AndroidManifest.xml files.
As for the other link (Z:\new\), make sure you have selected Z:\new\Chapter7, it looks like you didn't do that. it's looking in the \new\ folder for the AndroidManifest.xml when it should be looking in \new\Chapter7.

Categories

Resources