android-studio

Can't read data from external storage android emulator

泄露秘密 提交于 2020-04-17 22:11:13
问题 I'm creating an application where I want to read data from external storage (i.e get list of files and folders similar to file explorer) I have written the code it works fine on an actual device but in android emulator it only gives path and name of external storage from Environment.getExternalStorageDirectory() But when I try to list files and folders using the file.listFiles() function in java it returns null even though there are folders and files in that directory, This works fine on an

Can't read data from external storage android emulator

妖精的绣舞 提交于 2020-04-17 22:11:12
问题 I'm creating an application where I want to read data from external storage (i.e get list of files and folders similar to file explorer) I have written the code it works fine on an actual device but in android emulator it only gives path and name of external storage from Environment.getExternalStorageDirectory() But when I try to list files and folders using the file.listFiles() function in java it returns null even though there are folders and files in that directory, This works fine on an

Can't read data from external storage android emulator

◇◆丶佛笑我妖孽 提交于 2020-04-17 22:11:08
问题 I'm creating an application where I want to read data from external storage (i.e get list of files and folders similar to file explorer) I have written the code it works fine on an actual device but in android emulator it only gives path and name of external storage from Environment.getExternalStorageDirectory() But when I try to list files and folders using the file.listFiles() function in java it returns null even though there are folders and files in that directory, This works fine on an

Android Studio cannot find cerfile, emulator doesn´t start

北战南征 提交于 2020-04-17 20:50:33
问题 I just got this problem while trying to test a project I been working on, yesterday didn´t have this problem Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\yeyog.android\emulator-grpc.cer security will be disabled. Emulator: Started GRPC server at 127.0.0.1:8554 Any help would be appreciated! 回答1: I had the same issue a few minutes ago. Install your plugins if required, update the Android studio if required then uninstall the application from the emulator

Android studio display html in webview

北战南征 提交于 2020-04-17 18:59:58
问题 I tried to display html that contains tables and characters, At first Android studio didnt get the chars ("The entity ... was referenced, but not declared" error), so I replaced the html entity with the html code of each char and run the app. Now it just shows me the contents of the tables in text form and without the tables. My Java code: package com.example.alpha3; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.text.Html; import android.text

Android studio display html in webview

懵懂的女人 提交于 2020-04-17 18:59:52
问题 I tried to display html that contains tables and characters, At first Android studio didnt get the chars ("The entity ... was referenced, but not declared" error), so I replaced the html entity with the html code of each char and run the app. Now it just shows me the contents of the tables in text form and without the tables. My Java code: package com.example.alpha3; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.text.Html; import android.text

Cannot create an instance of class com.example.architectureexample.NoteViewModel

风格不统一 提交于 2020-04-17 18:45:57
问题 every time i run my app it shows this error in the title and i have searched for the problem some said make the ViewModel constructor public and mine is public other said Either: Remove the Context context and LifecycleOwner lifecycleOwner constructor parameters from your HomeViewModel, or Create a ViewModelProvider.Factory that can build your HomeViewModel instances, and use that factory with ViewModelProviders.of() and i have made the two solutions and still get the same error MainActivity

Cannot create an instance of class com.example.architectureexample.NoteViewModel

大城市里の小女人 提交于 2020-04-17 18:45:23
问题 every time i run my app it shows this error in the title and i have searched for the problem some said make the ViewModel constructor public and mine is public other said Either: Remove the Context context and LifecycleOwner lifecycleOwner constructor parameters from your HomeViewModel, or Create a ViewModelProvider.Factory that can build your HomeViewModel instances, and use that factory with ViewModelProviders.of() and i have made the two solutions and still get the same error MainActivity

Android Studio not showing available dependency update

梦想与她 提交于 2020-04-17 18:43:53
问题 I am on Android Studio 3.6.1, in my app build.gradle I have e.g. implementation 'androidx.fragment:fragment-ktx:1.2.2' There is version 1.2.3 since March 18th, yet no update hint is shown, neither when I hover over the dependency nor in Module settings -> suggestions . What could be the reason that the update isn't shown? Can I somehow trigger Android Studio manually to search for dependency updates and check when Android Studio did so last time? 回答1: You can manually check for dependency

Android Studio after update to 3.6 I see a black bar in the top of the windows in Windows 10

不问归期 提交于 2020-04-16 06:06:39
问题 Android Studio after update to 3.6 I see a black bar in the top of the windows in Windows 10. How can I remove it? It is making mouse fails when trying to select items in menu. 回答1: I found this which seemed to be related ide.win.frame.decoration and it worked in my case. I quote: Open Help -> Edit Custom Options... Allow a personal properties file to be created Add a line (true = hide; false = show) ide.win.frame.decoration=true Restart IDEA 来源: https://stackoverflow.com/questions/60424798