Changes to HTML files not showing on built phonegap 3.0 app - eclipse

So I have a Phonegap 3.0 app (project folder), and it's project (project/platforms/android) on Eclipse.
The problem is that when I change project/www/index.html , and tell Eclipse to Run the project, the changes don't appear on my device.
I noticed that Eclipse was saying Application already deployed. No need to reinstall. so I tried adding a space in a .java file so that Eclipse would notice some change in the project and rebuild it. It worked, Installing RingTo.apk... Success! showed on the log, but still the changes to index.html didn't show at the device...

Changes made to the files inside project/www/ are not automatically copied to your project (in your case to project/platforms/android/assets/www/). You have to run the following command to iteratively copy the changes to platform specific projects and build them. Open the command prompt and navigate to the root of the project (In this case project/). Or you can even right click on the project/ folder while pressing the shift key. Then run the following command:
cordova build
You can optionally limit the scope of each build to specific platforms:
cordova build android
Alternatively, you can run the following commands:
cordova prepare android
cordova compile android
In this case, once you run prepare, you can use Eclipse with ADT installed as an alternative to modify and compile the "platform-specific code" that Cordova generates within platforms/android.
Source - Cordova Docs
So, when you have made a slight modification in a .java file (which is an android platform specific file) and tried to rebuild it within Eclipse, you were actually trying to rebuild the same project without any actual modifications.
Another alternative would be to copy the files within the project/www/ to project/platforms/android/assets/www/ by hand and then build it within Eclipse, which would, of course, be an unnecessary pain.

Related

Local Swift Packages Stopped Working in Xcode 13

I've local Swift Packages added to a workspace. They reside in the project subfolders and connected to different git repositories as git submodules. Everything had been working perfectly (the project was able to build, packages were able to resolve, and I could edit the packages within the same workspace).
After I updated Xcode to 13.0, the project started failing to build with multiple errors Missing package product for each local package dependency. Removing derived data, resetting packages, cleaning build folder and restarting Xcode didn't help.
Quit Xcode
Open Terminal
Navigate to the directory where your .xcodeproj is via Terminal (cd path/to/your/apps/folder)
Run xcodebuild -resolvePackageDependencies
After the packages finish resolving, open Xcode and try building again.
This is what worked for me:
Click on the project file then go to Project (not a target) -> Package Dependences tab.
Double-click on any Package and copy the location URL to clipboard.
Remove that Package using the - button.
Add it back, pasting the URL.
Clean Build Folder, then Build.
Alternatively, removing an unused package in the Target -> Build Phases -> Link Binary With Libraries, also removed the errors for me.
Removing package references from workspace and re-adding them (by simple drag-n-drop from Finder) resolved the problem.
I even didn't need to reconfigure corresponding schemes, or re-adding dependencies in targets.
If #lazarevzubov's answer doesn't help, try few additional steps:
Open xcode
Delete one or couple of libs under Build Phases / Link
Binary with Libraries
Discard changes under git
Clean project
Close xcode
Run xcodebuild -resolvePackageDependencies
Open xcode again and try to build
In XCode,
File > Swift Packages > Reset Package Caches

Error: Entrypoint isn't within the current project

Unable to run flutter from Android Studio not detecting flutter project its shows Error: Entry point isn't within the current project
Every time restart android studio same error message shows
Delete the .idea folder inside the root of the flutter project and restart Android Studio.
Refer to this question: What is the .idea folder? and make your decision if it's safe or not to delete .idea folder.
Click on File-> Project Structure -> Module then add root folder of
your project then it will detect its a flutter app and then build and
work
its work for me
Reference: https://github.com/flutter/flutter-intellij/issues/2307
1) make sure flutter and dart sdk paths are properly configured from
File-> Settings..->Languages and Frameworks
as well as make sure Dart support is enabled for project module from Dart Option
2) at the end select File->Invalid caches and restart
3) so after 2nd step you may get in File->Project Structure.. option from there Select Modules then just simply add only root folder path of your flutter project and repeat just above 2nd step
for me this worked
Syncing your project with gradle files will solve it:
You can sync the files with Gradle, within the File menu.
Else You can re-include the files/project root folder inside the File Menu.
File -> Project Structure -> Module
And then add the root folder of the project(with + icon), then it will detect that it's a flutter app again, and then build and work again.
Try delete .idea folder inside project folder and Invalidate & Restart Android Studio.
For me my project was missing the pubspec.yaml file, it was deleted by mistake , instead of warning about the missing file , I got this error
This problem happened to me
I solved it this way
Go to the Android Studio track
I have this way
C:\Users\mustafamaxL\.AndroidStudio4.0\system
Remove folder (caches)
Then, start Android Studio again
If your ios, android, or lib folders are missing, it typically means there is something wrong with your project structure.
To fix it, delete the .idea folder in the root of your project and then restart Android Studio. If you're using a Mac, you can display the hidden .idea folder by pressing Command+Shift+Dot in Finder.
The .idea folder will be automatically regenerated and everything should be back where it belongs.
See this post for the original solution.
Click Content Root Close Icon and Remove Android Folder.
Fix it to me.
I faced the same issue today and tried other solutions here but it wasn't worked at all.
In my case I deleted three folders that is android, ios, and .idea from project directory, then restarted android studio and finally I gave this command in Android Studio's Terminal.flutter create . to create appropriate directories (i.e., android & ios).
Now it is working fine.
Note: Before deleting the android / ios directory please make a backup of these directories only if you previously gave native code in android / ios directory.
Hope this solution will helpful if others will not work.
The .idea folder will also be deleted on Linux. When Andriod Studio opens, click terminal at the bottom in Android Studio. Then type remove -r .idea/ in the terminal and press enter. After deleting, close and restart Android Studio.
You might need to update the Gradle version. Or change the minimum android SDK version.
Here is worked for me:
Update Gradle / minSdkVersion version
Reopen the project but at the directory user/StudioProjects/yourFlutterApp/android.
After it is opened it will load some packages (see right bottom), which will take some time.
It will ask you to update the Gradle version (right-left corner) or go under File>Project Structure Project you can set a higher Gradle version and under Modules variables of your build
Now you can sync your project with Gradle files
After configuration, you might need to restart your project with File>Invalid Caches/Restart....
I have created 2 folders inside lib's folder for my *pages* and *widgets*.
Getting the main.dart file back to the **lib folder** will do the trick
I'm currently in Android Studio Electric Eel.
I've done all of the suggested solutions above, but nothing works.
Turns out the project is not detected as a Flutter project. So what I do to resolve this issue is to remove gradle-related files from the root folder:
build.gradle
gradlew
gradlew.bat
gradle/

setting user.dir for gradle app running in eclipse

I have a gradle app a former employee developed that runs perfectly from the command line using ./gradlew. But now I'm trying to debug it in eclipse, so I'm starting by just trying to run it in eclipse.
I have the Buildship Gradle plugin installed and have created a run configuration that specified the working directory and passes program arguments. WHenever it tries to access anything in the filesystem, it's using the wrong path when the app uses System.getProperty("user.dir") - which is defaulting to my user's home directory instead of the project folder.
I've tried adding a "GRADLE_USER_HOME" classpath variable, but it doesn't seem to change anything. I've also tried setting Gradle User Home (under Preferences - Gradle) to the project folder, but that too doesn't help. I've also tried changing the Gradle Distribution from "From Import Settings" to "Gradle Wrapper", but that doesn't help.
Any help would be appreciated!
The system property user.dir has nothing to do with Gradle and I bet that it is also not set in the Gradle scripts. The system property user.dir is the current working directory of the user when he starts the program. So if you are in your project directory and call ./gradlew run, the working directory is your project directory. If you go one level up and call <project>/gradlew run you will also see a different behavior like from eclipse.
Set the working directory for the run configuration to your project directory, then you should get the right behavior. And probably you should fix this, so that not user.dir is used, if the project depends on the path being the project directory.

Subversion with Eclipse for android

Okay I am starting to give up with this. I have been trying to setup sebversion in Eclipse for my android project. I have been following the following tutorial
http://blog.bauson.com/eclipse-subclipse-svn-hostgator-com.html
I got the following:
Created a repository called myRep
Created a project under with source files myRep/TestProject and attached it to trunk
installed subclipse and got it to grab the repository
Now when, it says "Checkout as a project configured using the new project wizard", I get to choose the type of project. If I choose android application project then it creates a default android project and nothing is checked out. But when I choose General Project, it does grab the whole thing in the following structure
Repositony->TestProject->Trunk->All my android files and folders
However I want it to be android project so I can compile and run it. I did a lot of googling and I need your help pleeease!
Never mind, I figured it out. Apperently, when you choose the repository you have to right click and click refresh and it will show you a list of Folders (stupid eclipse does not do it automatically). Then you choose your project and create it as a new project. Voilla, you get it compiling and running

How to fix Google Play Services 2 Library install to Eclipse

I've tried to follow https://developer.android.com/google/play-services/setup.html instructions in Eclipse for Mobile Developers (Juno), but am getting multiple errors with the library package after importing the library project into my workspace. I fixed the AndroidManifest.xml error it reported, but now I can't open the project in Eclipse saying the .project description file contains invalid information. So much for a simple install. I've tried uninstalling it, redownloading it, and I still get the multiple errors. Any suggesions how to get it working?
There is a misleading step in step 3 of http://developer.android.com/google/play-services/setup.html:
Copy the
/extras/google/google_play_services/libproject/google-play-services_lib
library project into the source tree where you maintain your Android
app projects.
If you are using Eclipse, import the library project into your
workspace. Click File > Import, select Android > Existing Android Code
into Workspace, and browse to the copy of the library project to
import it.
Don't do the first copy. Instead just do the second part and check the box that says "Copy projects into workspace". I found that if I did the first part I would end up with empty xml files.
Try the following :
https://developers.google.com/maps/documentation/android/intro#sample_code
You would get errors while opening an activity mentioned in the sample code. That is because android.support.v4.app.FragmentActivity is not added to your build path. Hover over the error and click on "Fix Project Setup". It would ask you to add the lib to the build path. Say Yes and enjoy :)
If your google_pay_services/libproject is empty (mine was empty) and looks like installed in sdk manager, first delete google play services from sdk manager, install it again and follow the steps in the first answer.
Try Window > Android SDK Manager > Extras > Google play service > Delete package.
And then re-install that package again:
File > Import, select Android > Existing Android Code into Workspace
I had the same problem. I went to Properties->Java Build Path and clicked on the Projects tab. Then I added google-play-services_lib using the Add button. This got me this run-time exception:
E/AndroidRuntime(9469): Caused by: java.lang.ClassCastException: com.google.android.gms.maps.MapFragment cannot be cast to android.support.v4.app.Fragment
So then I changed the main.xml file entry from this:
android:name="com.google.android.gms.maps.MapFragment"
to this:
android:name="com.google.android.gms.maps.SupportMapFragment"
And FINALLY, it runs, but NOW no map due to authorization failure. So I am off on another search.
thanks Google for making it so complicated and for posting incorrect instructions!