I have a problem when I try to build or run my Android app.
I restored my project (after some others bugs), I removed and I added again Android platform.
Everything in Android manifest seems correct: activity, permission, service.
If I run “ionic cordova run android --device” the android manifest is recreated but It’s not the same !!!
How is it possible ? Can I run/build without recreate android manifest ?
That’s is very important because otherwise I got activity not found error in some situations.
It was a custom edit-config in config.xml that was breaking my rebuild. I removed it and it seems to work well now.
Related
I'm using my phone to test the application that I've been developing and I use android studio for building the app. When I tried to test the app on my phone, the app won't launch. But when I tried the built sample activity in the android studio it's working on my phone. I don't know how to fix this. I'm currently using Huawei Nova 3i.
PS: sorry for my bad English, English is not my mother tongue.
I am in android like you in English, but i would try to do teess things in your situation:
Check android event log, need to figure out the reason of app launch crash
Check your build configuration in Android Studio, may be it has any sense to change dev build to release
Check if android emulator or project libs to be compatiable with android version
That problem has many causes, If your module success configuration see manifest file you must make only one have launcher and delete android:name from it must launch successfully, But If your module didn't success configuration your must do it before.
Android Studio 4.2.1
Gradle 6.7.1
Gradle Plugin 4.2.1
From time to time (and unclear what causes this, although I think it might be related to interrupting a full rebuild), Android Studio gets "confused" about what permissions are set in AndroidManifest.xml, and shows errors within source code. Usually this happens on the VIBRATE permission I use, but I have recently started seeing it on NETWORK related permissions, like this:
Even though my manifest has it set:
When this happens, no manner of rebuilds, invalidate cache/restart seems to help, until at some point it generally just "goes away". A build and project run will work, I just continue to see errors in various files which reference permissions that AS thinks I have not granted.
I assume this is some gradle problem? What can I do about it?
Several months ago I updated Xamarin to 4.5.0.476 (Xamarin Android 7.3.1.2) and today, updating an App, I discovered that I cannot run my apk in release mode because it crashes when runs. And I can't understand why.
I tried to set all type of permissions on the android manifest.
Linker setting is SDK Assembly only but I also tried None.
I cleaned and rebuilt several times.
There's not conditional code that can fail on start-up.
Nothing, app always crashes when opening main activity.
Solved! In Advanced Android Option armeabi-v7a architecture was unchecked, there was only armeabi. I switched option on and app starts without run into error.
Since a couple of days code changes are not reflected when I press run app (^r). I now have to run my app twice before the actual code change is applied.
Yes I could clean my project of course, but I wouldn't want to clean my project for every time I want to check code changes. Also Instant Run is disabled so it shouldn't have anything to do with that.
I am running on Android Studio 2.3.3
- kotlin 1.1.3
- gradle 2.3.3
- buildTools 26.0.0
Is there anything I can do here to get this issue fixed?
edit:
- changes are in kotlin files as well as in xml files, both need 2 app starts before app gets updated to latest code changes :s. Tried invalidate cache and restart but that isn't solving the problem...
I face the same problem when i change html files. Studio cannot recognize changes in html files and does not re-deploy application.Uninstall the application on device and then run app.It should work.
What I have tried:
I have disabled, enabled the instant run multiple times.
I have tested the instant run on many projects.
I tried Invalidate Caches and Restart.
I tried to change on XML only, Java only, static fields, variables. all the cases restarts the whole app.
Still the instant run button restarts the app always.
The devices i use for testing are
Motorolla Moto G4 Android 6.0.1 and Samsung Galaxy s4 Android 5.1
Any solution for this problem ?
Seems like There's a bug in Android Studio 2.3(24Feb2017 Build)I have Workaround for Instant Run.
Working for me:
com.android.tools.build:gradle:2.3.0'
Not Working for me:(>2.3.0)
com.android.tools.build:gradle:2.3.1'
So You could try 2.3.0 for Project-level build.gradle
Welcome to #AndroidDev :)X)
I know it's been a long time since the question but I find myself in the same problem and I just discovered the solution:
In Gradle (Module: app)
buildTypes {
...
debug { multiDexEnabled true }
}
The mutidex was enabled in debug mode this was causing in my case the failure in instantrun at android studio 2.3.3
Just a little hint. When I switched from Android Studio 1.5 to 2.0 (stable) the new Instant Run didn't work with layout changes. I tried Run > Clean and rerun app and I solved, since that moment Instant Run works.And please refer below link.I hope it will help you out
Android Studio 2.0: Why does Instant Run not work when modifying xml layout resources?
or you can further refer below link for configuration
Android Studio 2.0 Instant Run Not Working
I also had a same problem after update "Android Studio 2.3"
Even small xml change went full install.
message : "Instant Run applied code changes and restarted the app. Static Initializer Change"
So I started to find which one made this problem from libraries I use.
and when I remove realm dependency from my code, Instant run work properly.
hmm. It's not a perfect solution. but this might be a clue.
ps - removing dependency is little bit annoying. so first time I removed realm initialize code but it is not working. only remove all realm dependency will work...
I had the same issue. For running the app its Shift+F10 for applying changes its Ctrl+F10. Try it. Hope it works.