I added Cordova to an Angular Project, where I create an Angular build and populate it into the Cordova app:
ng build --prod --base-href . --output-path ./cordova/www/
I then run that app inside Android Studio so I can emulate what it'll look like on a device.
The Cordova app runs, but if I go and make updates to the Angular app and then run the build script again, the version Android Studio sees is the old version.
The only way I've found to get around this is whenever I Invalidate Caches, but that seems cumbersome and like there must be a better option.
I verified that the files inside the Cordova app are the updated build files (I checked for the version marker). I've tried stopping and starting the emulator, telling Android Studio to rebuild the app, as well as stopping and starting the app inside Android Studio.
Can someone please tell me what I'm missing? TIA.
Related
So I recently started working with my friend on his app project and I've had trouble building his react-native based project. It's both ios and android.
On android, I can get as far as building, but when I run the app shuts down instantly or shows a red screen with some firebase error.
On ios, I get a build error.
My question is: what do I need to install when I first pull the repo from github? I run '''yarn install''' straight away and run '''pod install''' from the ios folder but that isn't enough. Anything I should run for android more than the yarn install command I had already used?
Thanks!
It seems your development environment is not set up yet. Follow this link to set up your environment.
I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.
I was always able to build from this project, this just started happening this morning. When I run ionic build android everything runs smoothly and the build succeeds, but the date modified on the android-debug.apk file stays the same, and I don't see my changes when I run it on a device.
Could it have something to do with messed up permissions and somehow it doesn't have permission to write the apk? I'm running Ubuntu-server 14.04.4.
I know it's been answered before but I'm adding this to let you guys know what I've tried and how it's not working anyways...
I've also faced same issue and tried several things like
Renaming APK file, expecting it will create new one.
Deleting build folder, expecting as usual will create new one.
opening project in Android studio, expecting it will create new one when I use it to launch the APK to device.
I've tried calling ionic prepare platform before calling ionic build.
The ionic build is a proxy for cordova build command.
But in this issue all of above approaches were failed.
The reason I can see behind this is because of no proper response/function of added platform to your project, as when you build it's cordova platform android's responsibility to prepare build on your command. Which is not working.
Lot of people suggests that You need to us ionic/cordova restore, this will restore your state.
Another way is you can use Android Studio's build APK option which helps you not to disturb your plugins by restore or reset commands.
Hope this helps you save your time from trying all these approaches.
Could it that you are looking at a wrong place?
When build command is successfully finished you should see smth like below in console
Built the following apk(s):
<PATH_TO_YOUR_SOURCES>/platforms/android/build/outputs/apk/android-debug.apk
Are you checking this this location?
Okay so the problem isn't with Ionic, it's just that the changed files aren't showing up in the ftp for some reason. So now I will try and figure that out.
As suggested by #mobileevangelist , ionic cordova restore can be done using command
ionic cordova prepare
It fixed my problem.
Try to
Open Android Studio
Choose Import project
Select YourProjectDirectory/platforms/android folder
Choose Build -> Build APK
I'm making my first steps in phonegap. I've been able to set up a project, install a plugin and build the app on my phone without errors. However, now, when I try to change the layout of my www/index.html in the project's root platforms/android/assets/www/index.html stays untouched whenever I (re)build the app.
I'm basically working in eclipse, only for html and javascript I use sublime. I've searched now for a couple of hours for a solution. The most promising approach was this thread: Changes to HTML files not showing on built phonegap 3.0 app ... but even that didn't work.
What can I have done wrong? There's no error, no warning (none resulting from the build process) and I don't know how I could debug the issue. I'm currently using phonegap/cordova 4.2.0
Any clue? Thanks
I still don't know the reason for my problem. However, installing the app via cordova CLI rather than eclipse seems to have solved the problem:
$ cordova prepare android
$ cordova run android
I'm just getting started with developing android apps with cordova/phonegab.
Everything is installed, blank sample app is running. However it seems changes are not shown. So basically it seems I'm stuck with the first build. I think cordova isn't making a build before running the debugger?!
How do I debug a cordova phonegap app with eclipse adt? Are there any best practices?
Another side question. ADT is either opening the browser or a simple text editor. Isn't were any code highlighting / code editor integrated into eclipse adt?
Thx. I really appreciate your help.
Seems you are following the process correctly but confused due to appname as everytime you create project with below command you app name will be Helloworld
phonegap create project_name
try creating a new project like this
phonegap create hello com.example.hello hello
then load it in eclipse and run.