flutter project showing error in kotlin MainActivity also AndroidManifest.xml file has three errors - kotlin

I make a flutter project in the android studio and as soon as I looked into the androidmanifest.xml file it showed error MainActivity must extend android.app.Activity even though I am not facing any issues in building a project but as I try to add the permission in androidManifest.xml it is not working

I had the same problem.
basically it can be fixed with a git command in your terminal...
git clean -xfd
so that's
-f to force untracked file deletion
-d to remove untracked directories
-x to remove untracked .gitignore files
It's possible you'll need to reconfigure your flutter and dart sdk paths, update your dependecies (flutter pub get / flutter pub upgrade) .
Be aware of that.
I found my solution here: Source

Related

What is the path of mapping file on Crashlytics server once crashlytics plugin automatically upload mapping file to crashlytics server?

I have added following code inside proguard-rules.pro for producing redable crash report once proguard enabled in my project.
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.
I haven't add mappingsFileUploadEnabled in build.gradle. So that means as per crashlytics documentation, plugin will automatically upload mapping file.
When i build the project my mapping file generated under build->outputs->mapping
Anyone please tell me crashlytics plugin on which location uploading this mapping file automatically ? Can i view this file on crashlytics portal once plugin uploaded to mapping file ?
At the moment is not possible to see the uploaded mapping files in the Crashlytics dashboard.
After building the app, you would need to cause a test crash and see if the code has been deobfuscated. If it is, then that means the mapping file got uploaded correctly.
If it doesn't, you could try running the gradle task that upload the mapping file and see if there are errors. for this you can use this command:
./gradlew app:uploadCrashlyticSymbolFileDebug --console=plain --debug | grep "com.google.firebase.crashlytics"

What is the proper way to upload a Vue.js app to GitHub?

I tried uploading my files to Github, but GitHub says it's too big.
I then uploaded the content of the dist folder after building for production.
This worked just fine, but it's not very useful.
What is the proper way to upload a Vue.js app to GitHub?
What you generate (binary files which can be big) should not be versioned/pushed to GitHub.
It is better to use a local plugin which will, on GitHub side, build, tag and publish a release associated to your project.
For instance: semantic-release/github.
You can combine that with a GitHub Action, which can take that release, and deploy it on a remote server of your choice (provided it is publicly accessible from GitHub): see for example "How to deploy your VueJS using Github Actions (on Firebase Hosting)" from John Kilonzi.
For your existing dist, you should delete it (from Git only, not your disk) and add it to your .gitignore:
cd /path/to/repo
git rm --cached dist
echo dist/>>.gitignore
git add .gitignore
git commit -m "Delete and ignore dist/"
git push
What happens if I add a node module( like if I decide to add an image cropper). How can the other contributers deal with that?
You need to add the declaration of that module in your project, not version the module itself. For instance, using Vue.use.
Also: I host the app on netlify. It builds the site straight from github. But it wont be able to build the site if gihub doesnt have the dist folder...
See "How to deploy your Vue app with Netlify in less than 2 min!" from Jean-Philippe Fong: Netlify itself will build the dist (from your GitHub project sources) and publish it.
You should add a .gitignore file to the root of your directory where you can ignore files and directories.
Most typical ones to ignore are the following:
node_modules
/dist
.env
.vscode

Can I Copy Over React Native Files Initialized Under One Project Over To Another Separately Initialized Project?

Let's say I initialize a project under react-native init <filename>, installed a bunch of node packages, and added code.
Then separately I initialize a different project under react-viro init <filename>, installed a bunch of node packages, and added code.
If I wanted to combine what I created under react-native init into what I created under react-viro init, is it as simple as copying files over and reinstalling missing node packages into the react-viro project?
Assuming you are working in the ./src folder, every file is independent of iOS or Android as part of the JavaScript bundle.
You can simply copy the .js files over and install the node packages in that project.
You probably should not copy any files that are outside the ./src folder, but I also suspect you wouldn't need to. Files in the Android and iOS folders are rarely touched as they contain operating system config settings and custom modules that you would have wrote in the native languages.
If the file renders JSX, you will be safe to just copy it over and hook it back up.
To state it another way, go into the folder that has node_modules in it. You shouldn't copy anything that is in that folder except additional files that you created. This is where people normally create an src folder and place all their JavaScript. You probably have an index file in there that points to ./src/app.js or you may have an index.ios.js and index.android.js that both point to a ./src/app.js. Anything inside src is safe.
That's my best answer without seeing your folders and files.
If you intend to copy code from one react native project to another, make sure the code you intend to copy is JS and not any native files. Make sure you do register the correct component using AppRegistry. Rest assured you can copy the code from one project to another.
Assuming you have a project at folder
/my-project/android
/my-project/ios
/my-project/src
Copy my-project and paste it at your desired folder like
/new-my-project
Change git origin
git remote set-url origin https://gitlab.com/..../**.git
Open /new-my-project/android in Android Studio, and then rename app/java/com.myproject to com.newmyproject
Go to app/build.grade and change com.myproject to com.newmyproject and sync
Create firebase project and download google-services.json file and add to new-my-project/android/app
Build application, then test application under metro bundler
npx react-native start
Create keystore, test notifications, change base_url_api, test apk etc Android finish now, iOS
Update pods on new-my-project/ios
pod install && pod update
open myproject.xcworkspace
Change bundle identifier to org.reactjs.native.newmyproject, version to 1.0, build to 1 and desired Display name. Let it index completely
Setup in firbase and replace GoogleService-Info.Plist file and Clean build folder in xcode
Go to developer.apple.com and create identifiers, APNS certificates, profiles
Download certificates from keychain and upload to firebase
Build the project in simulator/device and test it.
Done

Cocoapods Errors : Resource.sh not found

Folks,
Cocoapods : 0.39.0
FYI I have done enough research and I was able to take care of errors like:
Podfile.lock not found.
.menifest not found
and others while building my project.
Which still seem hack to me but as long as they let me build I dont care.
But one real problem is this :
Pod-resources.sh not found and this one is in the pod directory.
so for sure Its not in my source control as I dont check in pods dir into my project.
I have done more than enough weokspace deletion, podlock deletion, who pods dir deletion and pod install. but this problem is still there.
I am using apptentive which has a resource bundle, which need to be copied to the app binary.
At the moment I have disable Apptentive thru out the project to speed up the development and keep looking for solution.
Links that I have read are follows :
https://github.com/CocoaPods/CocoaPods/issues/2303
is from July 10, 2014 : seem too old to rely on.
CocoaPods Errors on Project Build
Error:"The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
The sandbox is not in sync with the Podfile.lock-ios
Error:"The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
How I solved my partial problem : delete workspace file, Pods Dir and .lock file. If this can help anybody.
Culprit was the path. It seem how Cocoapods is handling is different than earlier.
What it dont do is updating your project file for Copy Resources phase:
it seems they have update the path and now it has "/Target Support Files/Pods-ProjectName/" in it.
Older path: "${SRCROOT}/Pods/Pods-ProjectName-resources.sh"
New Path: "${SRCROOT}/Pods/Target Support
Files/Pods-projectName/Pods-Project-resources.sh"
So if you are having same errors like me you need to do is :
remove workspace file
remove .podlock file
remove .menifest file
do Pod install
update the path in build phase in xcode project file as shown above.
Now Build the project/workspace
Hope this will save someone's time.
You might have to add a PODS_ROOT user-defined build setting, as described here.

java.lang.NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream vaadin+gradle+intelliJ

I have been working fine with Vaadin + Gradle + IntelliJ until yesterday night when I introduced SLF4J(logback) logging to my application. Since then I can't make my project anymore due to classDefFoundError of org/apache/tools/ant/util/ReaderInputStream.
I can't link it with any transitive dependency of any contained jar in application, but even if I remove SLF4J libraries I still can't make my application, so I am wondering what changed?
I am using vaadin gradle plugin 0.9.5 and gradle 2.2.1. Has anyone ever encountered this problem? I was reading another post where someone had the same issue, but the solution he proposed is not valid to my application. He proposed to comment some of the lines in vaadin.gradle, which my application doesn't have.
Try
File > Invalidate Caches / Restart...
File > Invalidate Caches / Restart... nor did git clean -dfx. Here is what I had to do:
Close IntelliJ
IMPORTANT: Make sure you have everything commited you care about (you're about to clean your working copy)
Run git clean -dfx to clean your working copy
Run IntelliJ
Select Import Project
Navigate to the directory containing your project
The select Import project from external model and select Gradle
Press Next
Make sure the settings on the next page look ok then press Finish
The build should now hopefully work
I deleted the .idea folder and that worked for me.
File > Invalidate Caches / Restart... option didn't work for me, but
sudo git clean -dfx worked fine
remove .idea and invalidating caches worked for me.
rm -r .idea/ in command line
in Intellij GUI File > Invalidate Caches / Restart...