App crashes on startup for firebase_admob dependency 0.8.0+4 - flutter

I was using fiirebase_admob dependency 0.5.5 which was working great but when I went to release the apk version by flutter build apk --release it gave me error so I had to change the dependency from 0.5.5 to 0.8.0+4 and add API 'com.google.firebase:firebase-ads:16.0.1' in dependency of build>gradle this gave me the app-release.apk but causing app is crashing on startup. So, what should I change my dependency to get the app running smoothly?.

look for the file project.properties and modify the dependencies there with the versions that the error marks, the file build> gradle is modified each time the packager executes, so it does not keep them.

Related

I am having a problem building a Flutter App

I has a build a flutter app before successfully, but I try to update the code of my flutter app because I discovered some bugs but when j try to build it I get a error about error configuring video_player Android, I try to add it as a Dependencies but still it didn't work, I also invalidate cache's too it didn't work because it also said something about Cache's, I also upgraded my flutter SDK, still it didn't work, I will attach a image under this write up.
The error I am facing 😭😪
The error I am facing 😭😪
Write below command in terminal to clear cache with android project path.
flutter pub cache clean
./gradlew clean
gradlew cleanBuildCache

Deep AR Flutter: Direct local .aar file dependencies are not supported when building an AAR

I'm following the documentation as given in the plugin page on camera_deep_ar
I have set the minimumSdkVersion to 19
Given the permissions correctly in the AndroidManifest.xml
Set up the proguard-android.txt file correctly
And used the sample code given in the docs
This is the error it gives me on running the app.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':camera_deep_ar:bundleDebugAar'.
> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error).
The error seems to be thrown from the camera_deep_ar plugin. Try rebuilding the Flutter project to check if this can solve the references in the project. To do this, run flutter clean then flutter pub get.

Flutter - Overridden dependencies

After running "flutter pub get", I got this error:
Warning: You are using these overridden dependencies:
! path 1.6.4
That's not an issue. That happens because you (or any other transitive dependency) may be overriding some dependency that you are already using. For example, if you are using path: 0.X.X and some other dependency use dependency_overrides to make sure that is using path: 1.6.4, it will present you that message.
Overall, you shouldn't have to worry with that and sometimes it is actually required in order to some dependencies work all together.
Please give more details so that i can answer it better. Attach your pubspec.yaml.
But now i can tell you some methods which should work..
first of all see if you are using the latest version of all dependencies or not then:
try:
restarting your ide
flutter clean
if these two don't work then at last try
flutter pub cache repair
I encountered the same error after cloning a flutter repository. I initially mistook the error for being a build issue when it's just a warning that won't stop your app from running.
I solved the build issue I was having with the freshly cloned project by running this command inside the app's root directory: flutter pub run build_runner build

Flutter - Gradle task assembleDebug failed

When you run flutter run, such an error is displayed, when checking flutter doctor no error, what is the reason?
I was facing the same issue for my project earlier and found the solution as below.
I have changed the Gradle wrapper properties distribution URL version to: 5.5.1-all which was available in my system.
Due to some reason, the android studio was fetching the latest version which was not in my system.
Problem:
Zip error occurs while compiler tries to wrap code with Gradle wrapper properties.
If the required files are missing or not properly available after downloading, this error occurs.
Solutions:
1) Redownload the Gradle which you are using currently.
2) Change the version of Gradle wrapper property version available in your system.

producing flutter (Xcode) testflight archive fails with multiple commands produce

need to produce an archive so we can upload to TestFlight so followed instructions in https://flutter.dev/docs/deployment/ios . my flutter runs on both real iPhone and simulator with no problem. so I produce a release version as required then open the resultant Xcode project (runner). immediately see the error
:-1: Multiple commands produce '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/jmcfet/AndroidStudioProjects/sis/ios/Flutter/Flutter.framework' to '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
now this does not happen when I do the same against the "Flutter Hello world" app so wondering what is messed up in my Flutter app
no luck :
johns-MacBook-Air:ios jmcfet$ pod install
Analyzing dependencies
Fetching podspec for Flutter from .symlinks/flutter/ios
Fetching podspec for video_player from .symlinks/plugins/video_player/ios
Downloading dependencies
Using Flutter (1.0.0)
Using video_player (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).
not an IOS expert but looks like the install was not successful. little confused as the Xcode project was generated by Flutter so why is Flutter generating a bad config file. if so looks like a bug to me