I have changed the package name from: com.android.co.smash
to: com.android.smash
but after changing the name is shows error:
com.android.co.smash/com.android.smash.views.activities.LoginActivity} does not exist.
it seems like the old name still exist, how can i solve this problem?
I've run into this problem when uninstalling the app and then trying to run it again from Android Studio. There seems to be some kind of bug where it thinks there is already a version of your app installed. Very weird. On your device, if you go into Settings > Apps & notifications > Your app, (If you have deleted the app) you will see all the options greyed out. In the top right corner click the 3 dots for the more options menu, then click Uninstall for all users. This will remove whatever remnants of your app are left on the device. Then you should be able to run it from Android Studio again without any issues.
He thanks in advance,
In react native am not able to right click or open dev mode in emulator.
adb shell input keyevent 82
Use this in your windows command line, It works for me.
If the above solutions did not help, here is what worked for me.
Use an emulator that has Play Store installed. When creating a virtual device in Android Studio, it will have the Play Store icon.
Download Expo from the play store. For some reason, the Expo app that vscode pushes to my emulator won't work properly for me.
Run expo start and open the Expo Developer Tools page on your browser (by typing 'd' if it does not open automatically), and copy the url at the bottom left. Will look like exp://127.0.0.1:19000 if you started with --localhost
On the emulator, run the expo app and on the top select Open from Clipboard and it will show the url you copied.
For me, this did a better job at starting the Building Javascript bundle, and once the app was loaded, I was able to use Ctrl M to mimic shaking the device and open the developer menu!
Other troubleshooting tips I learned while figuring this out:
Like the comments above state, don't be in production mode
Make sure to have paths set up correctly to be able to reach your Android sdk, nodejs, and your local project node_modules/bin if you are not doing global npm installs.
If you are having issues with remote debugging, make sure the Chrome debugger is not open. Close it if it is open, have your debugger listening on the correct port (for me 19001) and reload the project on the device.
I hope this helps someone.
FOR WINDOWS 10 YOU NEED TO ADD THIS SO THAT YOU CAN USE CRTL+M to open debug and reload
Add environment variables
Open a File Explorer, copy and paste the following into the address bar.
Control Panel\System and Security\System
Click on Advanced system settings on the left menu.
Click on Environmental Variables at the bottom.
Click on New to add a user variable (the top section).
You’ll be adding two:
Variable Value
ANDROID_HOME C:\Users\username\AppData\Local\Android\Sdk
JAVA_HOME C:\Program Files\Android\Android Studio\jre\jre
Then under System variables (the bottom section), click on the Path variable and click on Edit.
On the pop-up window, click on New to add another variable:
C:\Users\username\AppData\Local\Android\Sdk\platform-tools
C:\Program Files\nodejs\
Click OK, OK
Then try your emulator
see this link: https://medium.com/#lpault29/react-native-environment-for-windows-e25806df867c
Turning off production mode solved my problem.
There is post which says turn off production mode -> it took me time to find in which settings -> I was looking in emulator settings, it was in expo-cli. This post is it clarify it.
Production mode off
In the expo-cli http://localhost:19002/, there is Production Mode (left side bar) -> turn it off
Open AVD Emulator and your application, press ctrl+M
It should work.
*Make sure we installed all of these SDK files,I tried all of the above solutions but no one solved my problem but everything is working now after doing this, hope it will solve your problem also
In my program's any activity ,I press the home button,and then in desktop press my app's icon,I saw the launch activity,not before activity.What happen on my app?
And I found if I use Android Studio run without sign,the app is run normally.A month ago,I move the codes from eclipse to AS,on eclipse IDE not found this problem.Can anybody help me? Very thx.
Maybe grammar errors,sorry.
EDIT:I found this is an Android bug https://code.google.com/p/android/issues/detail?id=26658
And the solution is https://code.google.com/p/android/issues/detail?id=26658#c14
If you are working on real device, make sure you didn't set the flag
Don't keep activities in Developer options.
On emulator check in running configurations that you launch the default activity.
On manifest check that you do not exclude your activities from recent.
This always worked before but since yesterday the little green arrow (green background, white right pointing triangle) does not work. Nothing happens, except maybe once in twenty tries. I have to push the small black down facing triangle right to it and launch the project from the popup menu.
I also have a keyboard shortcut bound to the same "Run" command. Also this shortcut has the same problem. It only rare works since yesterday. Most of the times there's nothing happening at all. No output in Console.
Try this:
Clean Project -> close all files
Restart Eclipse
Right click on project -> Run As -> Android Application
Try the run button again.
Let us know the outcome.
Not sure whether is this the case or not. When you working on your XML or Manifest and you launch your application it wont really work. It will launch your xml file instead and might create an extra file in your project. Try to launch your application in an activity(Java) page.
This question already has answers here:
Why doesn't logcat show anything in my Android?
(29 answers)
Closed 7 years ago.
I am using Eclipse classic to develop my Android applications. But I am not able to see any messages in the LogCat. Till yesterday it was showing each and every message, but now it is not showing anything. I have written a lot of log statements to trace my program, but because of this I am not able to trace.
Where is the problem?
Try these first
Go to the device tab, click your device. and go back to the logcat
tab
You might have filter set.
You are probably viewing the wrong package.
I've got it solved by:
Closing the logcat window
Running the following in command prompt:
adb kill-server
adb start-server
Opening logcat again
Every now and then I experience that the logcat output in Eclipse stops showing any logs. It doesn't matter if I unplug and plug the device. It seems like the issue occurs if the logcat gets a ton of messages, and is unable to handle the amount.
The only thing working is restarting Eclipse or use DDMS directly (which also suffers from the same problem).
Go to Window - Preferences - Android - Logcat .
On that page
"Show logcat view if message priority is at least " select VERBOSE.
This happens when you don't close eclipse for a long duration, just close eclipse and reopen it, your problem should be solved.
Correct answer: it is/was a bug in Eclipse. All I did to trigger it was to rename one of the filter and pressing the Run button.
Restarting Eclipse fixes it.
In eclipse, go to: windows->preferences
Then go to Android->logcat and make sure you have the following setup:
1. double-click action: "go to problem (error line)
2. switch to: java
3. both checkboxes are checked
if your setup is fine, clean the project and restart eclipse
good luck!
Some times it does happen on a slower machine that eclipse waits for emulator HOME screen and after waiting too long it shows that the emulator is offline.
Secondly Make sure that you are looking in the correct filter or in all messages part.
Also you can do the following :
select the device and find your process (e.g. "com.android.myapp")
Look for its process id written to its left (eg. 17260)
Now go to logcat and add a new filter by witting a particular name and the specific Pid (say 17260)
Now select that filter and you'l be able to see your log messages
Good Luck!
I had the same issue, but gave up on eclipse logcat panel and switched to cygwin+adb:
make sure the app is running and launch cygwin
cd /cygdrive/c/android_sdk/sdk/platform-tools #go to where adb.exe is
[optional] ./adb logcat -c #clean the log, obviously don't do this if you want to see some old messages
./adb logcat #see all messages
or
./adb logcat | grep "whatever" #look only for whatever you want to look for
Go to Device from DDMS and open it.
Select your device from which device your application is running
Select your project which you run on this device
I had this issue for the last few days and tried everything above.
As it turned out, my problem was that all my log statements were in a class that was not being reached. I thought it had because of what was being displayed but that was not the case.
So in short, check with the following
Post log statements at the beginning of every method.
I too had the same problem , and I solved the issue by
-> restart the eclipse
-> go to ddms -> click on the emulator
I tried all the above solutions, but nothing did work. Then, I saw I had a button named "R", then something clicked in my mind, I renamed it to:
R1=(Button) findViewById(R.id.button1);
So maybe it was conflicting with R of Android and Java name of a button "R".
Hurray error got resolved.
Let us conclude with the following steps:
Check if u have any variable(button,textview) name which is “R”
Save your project, close Eclipse and then open it again.
Project --> clean
import android.R; remove this.
Correct answer: it is/was a bug in Eclipse. All I did to trigger it was to rename one of the filter and pressing the Run button. Restarting Eclipse fixes it.
You might have switched off LogCat by Mistake
Go to Preferences>Android
Click LogCat and make sure there is a check next to "Monitor logcat for messages from applications in workspace"
Then select the dropdown "Show logcat view if message priority is at least" and choose "VERBOSE" (or depending on how you tag your Logs, but VERBOSE will get all output)
Click "Apply" and you should start seeing your messages again
Make sure that you set
android:debuggable="true"
in your manifest file.
I was facing the same problem and the following steps resolved the issue:
Restart my Eclipse
Restart my Emulator
Select devices tab from DDMS perspective in Eclipse.
Check the device is not at fault. My device was set not to log, accidentally disabled it via boeffla kernel. After turning it back on logcat worked fine.
Go to windows->preference->android->logcat
select the option -
show logcat if message priority is atleat verbose.
It will show all the events of device and close all the perpestive and open logcat it will be working again.
On right top corner click on "Display Saved Filter View" or if "display saved filter view" is already open then just click on the red - icon to delete selected logcat filter.