java.io.FileNotFoundException(Access is denied) IDE Fatal Errors - android

I'm a novice user of Android studio. While I'm using it, an error message has kept coming up. I tried to change the folder's property into the full access by user and administrator as well as other advices here but still error message below pops up.
[IDE Fatal Errors]
C:\Users\hakmin\.AndroidStudio3.1\system\gradle\Projects\ff20177d\project.dat (access is denied)
java.io.FileNotFoundException: C:\Users\hakmin\.AndroidStudio3.1\system\gradle\Projects\ff20177d\project.dat (access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectSerializer.save(ExternalProjectSerializer.java:234)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectDataCache.saveExternalProject(ExternalProjectDataCache.java:85)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectDataService.importData(ExternalProjectDataService.java:59)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.doImportData(ProjectDataManagerImpl.java:271)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:145)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:221)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:228)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:117)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:94)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:39)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:84)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Thank you.

Related

How fix My android app not working on android 9?

My android app works fine on android below 9 but on android 9 not working and app will close after run with Myappname Keeps Stop error on phone.
I've build app with SDKVersion & TargetSDKversion 28 ( Android 9 ) already. Please help me how can compatible my app with android 9
This is my Logcat when my app crashes , I think there is problem with background processes
--------- beginning of crash
2019-12-20 18:08:33.181 9444-9499/com.example.asanbekhar E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.example.asanbekhar, PID: 9444
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/DatatypeConverter;
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10)
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51)
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46)
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32)
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75)
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.DatatypeConverter" on path: DexPathList[[zip file "/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10) 
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51) 
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46) 
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32) 
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151) 
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75) 
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
2019-12-20 18:08:33.192 9444-9499/com.example.asanbekhar E/UncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/DatatypeConverter;
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10)
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51)
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46)
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32)
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75)
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.DatatypeConverter" on path: DexPathList[[zip file "/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10) 
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51) 
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46) 
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32) 
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151) 
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75) 
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
The problem is because android 9 and above uses SSL socket ( HTTPS Ports ) to communicate and in this case the http port used. The problem solved with adding this line below to Manifest file
android:usesCleartextTraffic="true">
<uses-library android:name="org.apache.http.legacy" android:required="false" />

Imported eclipse project error after updating android sdk

After updating android sdk, encounter a confused error when building my project.
It is a imported eclipse project, what I did is installed SDK 26 and build-tools 26, uninstalled old SDK 15-18 and build-tools 25.0.2.
I try to reinstall these things, but not work.
Here is the error message:
Error:Internal error: (java.lang.ClassNotFoundException) com.android.prefs.AndroidLocation$AndroidLocationException
java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation$AndroidLocationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:404)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:480)
at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:110)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:84)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:267)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$$Lambda$4/71020844.run(Unknown Source)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$$Lambda$2/1522311648.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

LocalFingerprints: cannot compute fingerprint

I am getting one strange error it occurs randomly to any time and crashes the app. i am testing on nexus 6 in Android 7.0
here is log cat
E/LocalFingerprints: cannot compute fingerprint for: content://media/external/images/media/306155
java.io.IOException: read failed: EISDIR (Is a directory)
at libcore.io.IoBridge.read(IoBridge.java:481)
at java.io.FileInputStream.read(FileInputStream.java:252)
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.security.DigestInputStream.read(DigestInputStream.java:161)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at kei.b(PG:81)
at imp.a(PG:1324)
at ilf.a(PG:131)
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.system.ErrnoException: read failed: EISDIR (Is a directory)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:169)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:231)
at libcore.io.IoBridge.read(IoBridge.java:471)
at java.io.FileInputStream.read(FileInputStream.java:252) 
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889) 
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273) 
at java.io.BufferedInputStream.read(BufferedInputStream.java:334) 
at java.security.DigestInputStream.read(DigestInputStream.java:161) 
at java.io.FilterInputStream.read(FilterInputStream.java:107) 
at kei.b(PG:81) 
at imp.a(PG:1324) 
at ilf.a(PG:131) 
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81) 
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.os.HandlerThread.run(HandlerThread.java:61) 

Android Studio 2.2 start failed

Just downloaded Android Studio Canary Build: 2.2 Preview 6, on trying to start I get:
Internal Error. Please report to https://code.google.com/p/android/issues
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:96)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
... 1 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Layout
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Layout
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I've googled and not been able to find any fixes.
I'm running Linux Mint Rebecca 17.1 32-bit.
Not sure what other information to provide. Any help is appreciated, thanks.
just install the jdk1.8.0_102 and set JAVA_PATH in your Environment Variable to C:\Program Files\Java\jdk1.8.0_102
I must have messed up installation somehow, after deleting ~/.AndroidStudioPreview1.2/ and ~/.AndroidStudioPreview2.2/ I redownloaded the installation zip and reinstalled. Now it seems to be working.

Can't open ddms

I am using ubuntu 14.04 LTS to build android using command line. However after I open emulator, trying to open ddms. I got the following error message
09:36:10 E/ddms: shutting down due to uncaught exception 09:36:10
E/ddms: org/eclipse/jface/util/IPropertyChangeListener
java.lang.NoClassDefFoundError:
org/eclipse/jface/util/IPropertyChangeListener at
com.android.ddms.Main.main(Main.java:74) Caused by:
java.lang.ClassNotFoundException:
org.eclipse.jface.util.IPropertyChangeListener at
java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
java.lang.ClassLoader.loadClass(ClassLoader.java:425) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at
java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 1 more
It seems that there is a class not being found. But I am not sure what exactly it means.
After searching, I found it may be wrong ANDROID_SWT. However after I check, there still exist the same problem.
Any idea can help! Thx!

Categories

Resources