I've installed Android Studio 2.3 rc1 and my app doesn't run. Only the Splash screen activity that I've setted up is shown, and then the app crashes.
The big problem is that the log is empty, shows only "Connected to process..." and "Application terminated".
How can I solve this? Is it normal for non-stable version of Android Studio (I'm a noob) or it's a problem of my app?
Edit 1: I've tried to create a new simple project but the result is the same. So maybe the problem is the IDE.
Edit 2 (partially solved): During operation on Edit 1, I've tried a code sample from My App, not an entirely new project, the problem was exactly in that code XD.
Now I've tried other projects and they work.
Edit 3 (solved): I'm really sorry, I think you can delete this thread. The logcat was not empty. I had exchanged the position of the logcat screen with the run one, and by force of habit, always clicked on it without reading the label that had changed. Forgive the fool.
Android studio allow you to run Stable, Beta and Canary builds at the same time. Try running your app on stable version to find out if this has something to do with the IDE or your app.
When you are running Beta/Canary builds it is always a good idea to keep a stable version in your computer as these releases are not always 100% stable.
Related
After creating a new Flutter Project in VSCode/Android Studio, there are just no code suggestions. Pressing ctrl+space usually brought up suggestions in both, but now on Android Studio it says no suggestions, and on VSCode I get the usual few snippets, no IntelliSense.
Weird thing is when I tried reopening previous projects, some projects are still fine, some projects have the same issue. I have attached screenshots of when it works, and when it doesn't
PS: I'm not sure if this is related but in VSCode just when a new project is made it fails to recognise the header file so it highlights everything as Error though the code runs fine. However this gets fixed when the window is reloaded
This usually happens when your IDE is not sync with the version of Dart and/or Flutter used in the project ; that's why on some projects it still works, and not on the other.
Option 1 :
Try to update your Dart/Flutter version on the project, and on the plugin/extension of the IDE. Watch out to have the last version of your IDE, not on beta channel, as well.
Option 2 :
If still not working after the update, delete IDE related files in problematic projects and reopen them.
Last time worked for me, hope it will for you !
I have just updated my Android Studio to 3.5 and I am starting to use the new "Apply Changes" feature. I can deploy my apps without problems using AVD, but when I use my smartphone (Galaxy S9+ with Oreo) the process keeps crashing and all the times I have to kill manually the app and click Start.
I've already tried to create a new project, kill all the apps, plug & unplug the USB cable and restart my device. I tried also Invalidate cache/restart and clean project.
This is the error that the IDE gives me:
E/zygote64: Bad JNI version passed to GetEnv: 805372416
E/studio.deploy: Error retrieving JVMTI function table.
Changes were not applied.
We were unable to deploy your changes: MISSING_AGENT_RESPONSES
Thanks for your help
After contacting the Google Team they have opened a new issue, here's the link if you want to stay updated: https://issuetracker.google.com/issues/139942372
UPDATE: Google has marked this issue as fixed, I think that in the next update everything will be fine.
If this is happening with a plain project, my guess is that there is some incompatibility between your device and the "Apply Changes" feature in Android Studio 3.5.
This issue seems to match your symptoms. Keep an eye on it, and with luck this will get fixed in Android Studio 3.5.1, either by fixing the IDE or at least detecting that "Apply Changes" will not work and reacting better.
OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.
I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.
I'm very close to giving up with Android development. I don't currently have an Android phone so I'm trying to use emulators. In Eclipse, after fixing 500000 bugs/errors I finally managed to get an emulator to launch - but it kept getting stuck on the Android loading screen (even after like 45 mins) so somebody recommended me to use Android Studio.
I downloaded this on my PC, and when I tried to run a blank activity I got this error:
When I tried to actually play around with the activity, I got a rendering error:
I saw some stuff online that said to use a downgraded Android version for the error to go away - however, I only have 2 versions as you can see and none of them are working.
I tried downloading/installing Android Studio on my laptop too and got the exact same problems. What is going on? I have spent 2 days trying to run a blank activity now and am really on the verge of just giving up. Any ideas?
EDIT: Trying out Jorge Casariego's suggestion but cannot find Open Modules when I right click
Looks like it happens because you are updated Android build tools to "24.0.0 rc1" but not update gradle build plugin to 1.3.0-beta1 version.
Make sure that you have in yourProjectFolder/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0-beta1' // or 1.2.3
}
And in yourProjectFolder/mainModuleName/build.gradle you have
android {
...
buildToolsVersion "24.0.0 rc1" // or 23.0.1
...
}
or as a variant use last stable versions of build tools
To downgrade your SDK, you need to download a different SDK version. To do this, you need to run the SDK Manager which is the 4th image from the right:
This will allow you to download different versions of Android, allowing you to get API 19/20/21, which should fix your issue.
I get this rendering problem all the time and I've been developing for almost 2 years now, with over 10 months on android studio. These rendering problems are only for the activity preview, which usually isn't very helpful at all anyway. If you don't have an Android device, my best suggestion would be to download the GenyMotion emulator. It is 1000x better than the built in emulator, and even has a plugin for android studio that allows you to run it from within the IDE. If you need to check how a layout works, I would recommend just running the app in the emulator, as you will get a much better idea of how things look anyway, rather than trying to approximate it with the layout previewer.
Edited 6/10/18:
The packaged emulator has been updated extensively and now performs much better. For that reason, I've removed the link to the 3rd party tool. I realize my intention at the time was to be helpful, but having a link to a 3rd party tool in a stackoverflow question seems inappropriate, especially given the reason for highlighting it is outdated.
To resolve this issue follow the following steps :
Go to your app folder under Navigation section.
Right Click -> Open Module Settings
Set Compile with SDK Version as API 22 or below (Lollipop)
Set Build version as 21.1.2
Clean + Build your Project
to use the new M preview, you'll need to also use Android Studio 1.3 Preview (from the canary channel).
I have this problem too. Because I named my App the wrong thing. It has a "-" character in the app name. Ex: Web-ViewDemo. It causes a wrong location, so android studio can't do anything totally right 100%.
In short, try to rename your app!