android-studio

Logs/logcat not working in BroadcastReceiver

戏子无情 提交于 2021-02-02 09:30:42
问题 I have a BroadcastReceiver and it there is some problem. The Toast message is showing, and the logcat message is appearing with the command line logcat tool, but not in the Android studio Logcat display. Why? I have already tried android:debuggable="true" and anything has not changed. public class AlarmReceiver extends BroadcastReceiver { private String filePath; private Ringtone ringtone; @Override public void onReceive(Context context, Intent intent) { Log.d("RECEIVE", ""); Bundle extras =

Access denied finding property “persist.vendor.log.tel_dbg”

冷暖自知 提交于 2021-02-02 08:54:13
问题 I am trying to display Json data extracted from open weather map api and find it in the logcat.After successful build and installation of the app.I am getting this error.The error is Access denied finding property "persist.vendor.log.tel_dbg" public class MainActivity extends AppCompatActivity { EditText mEditText; TextView mTextView; String api="http://api.openweathermap.org/data/2.5/weather? q=kolkata&appid=e8cd0e5f8d3ba1e87d108da87d9c0a94"; @Override protected void onCreate(Bundle

Access denied finding property “persist.vendor.log.tel_dbg”

六眼飞鱼酱① 提交于 2021-02-02 08:53:25
问题 I am trying to display Json data extracted from open weather map api and find it in the logcat.After successful build and installation of the app.I am getting this error.The error is Access denied finding property "persist.vendor.log.tel_dbg" public class MainActivity extends AppCompatActivity { EditText mEditText; TextView mTextView; String api="http://api.openweathermap.org/data/2.5/weather? q=kolkata&appid=e8cd0e5f8d3ba1e87d108da87d9c0a94"; @Override protected void onCreate(Bundle

App updates data in firebase real-time database but doesn't show anything in recyclerview

社会主义新天地 提交于 2021-02-01 05:14:38
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

App updates data in firebase real-time database but doesn't show anything in recyclerview

孤者浪人 提交于 2021-02-01 05:14:28
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

App updates data in firebase real-time database but doesn't show anything in recyclerview

时光毁灭记忆、已成空白 提交于 2021-02-01 05:14:17
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

Android Studio can't find Kotlin dependency

爷,独闯天下 提交于 2021-01-31 07:21:39
问题 I was trying to upgrade some dependencies for my Android Studio project and now I'm stuck with this error message whenever I try to build the project: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Could not resolve all task dependencies for configuration ':app:debugAnnotationProcessorClasspath'. > Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains

Check if the navigation bar is hidden with ADB command “overscan”

北城以北 提交于 2021-01-29 22:04:09
问题 Many popular third parties apps and users are hiding the navigation bar by using a particular ADB command : adb shell wm overscan 0,0,0,-202 The particular thing of this command is if you check the presence of the navigation bar by reading a boolean from Android resources it will always return true (navigation bar is not hidden). That tricky ADB command doesn't hide the navigation bar it just moves it off the screen. Is there a way to detect this? 来源: https://stackoverflow.com/questions

Ubuntu: setting environment variables

微笑、不失礼 提交于 2021-01-29 20:51:13
问题 I need set environment variables for Android Studio project EVERY TIME when reboot or close terminal. (Ubuntu 14.04) For setting variables I use: export KEYSTORE_NAME=/home/anna/Documents/keys/NAME.keystore export KEYSTORE_NAME_PASSWORD=PASSWORD export KEY_NAME_ALIAS=NAME export KEY_NAME_PASSWORD=PASSWORD How can I set there variables forever? 回答1: Put those lines in /home/anna/.bashrc or in /home/anna/.bash_profile depending on which file you use. I think it is .bashrc in Ubuntu by default.

Load second URL if first is not present in android webView

冷暖自知 提交于 2021-01-29 20:25:09
问题 I was making a webview application for my local network. I have two static IPs. All I want to do is to load second if 1st one is down. (Because one of them is always running). What I'm doing is to check it in onRecievedError() function and change the URL value, then call the onCreate() again like this. public void onReceivedError(WebView view, int errorCode, String description, String failingUrl){ Toast.makeText(getApplicationContext(), "Failed loading app!", Toast.LENGTH_SHORT).show(); url1=