Flutter firebase database plugin example project not building for android - firebase-realtime-database

I'm working on a flutter project that uses firebase real-time database. The project works seamlessly for iOS, but doesn't build for android, although I've followed the guide.
When building the project for android, I am facing the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_core:processDebugGoogleServices'.
> No matching client found for package name 'io.flutter.plugins.firebase.core'
I downloaded the official plugin example at github code as-is, and tried to build their example project. The same error occurs.
Is anyone able to build the following project for android?
Github Flutter Firebase Database Example Project. If anyone succeeds to build it, I would be very grateful in showing me how.
Thanks in advance :)

The main problem was that when I was compiling the android project, I was doing so by opening the android folder in flutter project and not the main flutter project folder.
The solution was simple but subtle.
change the android package name to match that specified in firebase
follow the google guide of firebase setup for firebase android part
build the project by opening the main flutter folder (project's root folder) and not the android project folder. (this is the subtle step I was missing)
Just for reference, I had to add 2 parts of code for the project's root build.gradle file for it to build:
buildscript {
repositories {
// ...
// ...
// ...
// add the following line
maven {
url 'https://dl.bintray.com/android/android-tools'
}
}
}
// ...
// ...
// ...
// add the following snippet
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency {
details - >
if (details.requested.group == 'com.android.support' &&
!details.requested.name.contains('multidex')) {
details.useVersion "27.1.1"
}
}
}
}

Related

Flutter Plugin Development native vendored_frameworks file not found

I'm working on the flutter-webrtc plugin for iOS. Previously, the plugin use the prebuilt cocoapods dependency. But, in the WebRTC M80 Release Notes they state they are going to be deprecating the mobile libraries.
To stay up to date with the latest iOS native WebRTC bugfixes and features, we now need to build from source.
I've built from source and I was testing it with WebRTC's AppRTCMobile example app and it is working over there. Now I am trying to import the WebRTC.framework into the flutter plugin and I'm having trouble.
There is no flutter documentation on this, but I followed guidance from this github issue. I've copied the binary built from source into the plugin ios directory and modified the flutter_webrtc.podspec to include the framework, but I'm getting the error:
Xcode's output:
↳
In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.m:1:
/Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.h:4:9: fatal error: 'WebRTC/RTCDataChannel.h' file not found
#import <WebRTC/RTCDataChannel.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterRTCVideoRenderer.m:1:
In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterRTCVideoRenderer.h:1:
/Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.h:4:9: fatal error: 'WebRTC/RTCDataChannel.h' file not found
#import <WebRTC/RTCDataChannel.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
I'm really new to flutter plugin development so I'm not sure if I'm doing this correctly. Any tips would be very appreciated!
After adding the binary to the plugin ios directory, I needed to manually go into my app's ios directory (the app depending on the plugin) and manually run pod install && pod update.
After that, the plugin import errors were fixed and I'm now using WebRTC built from source in the flutter-webrtc plugin :)

I can not build the generated Android project by Zebble

I am getting the following error when building the android project generated by Zebble for Xamarin.
I followed the steps in -READ-ME-NOW!!!!!!!!!!!! text file. When I did build the android project, this is error I got:
The command "Zebble" update-schema auto" exited with code -1.
Some additional error log I found from Build output:
EXEC : error : Failed to update the xml schema for intellisense: Failed to find the UWP exe file. Searched all EXE files inside: E:\Labs.NET\Xamarin\TestZebble\TestZebbleApp\Run\UWP\bin
Could you please tell me what has gone wrong.
Hope this helps:
Remove all zebble folders from nuget packages folder.
Remove the Run\Android\Zebble.exe file.
Update the zebble nuget to latest version.
Set the Android project as startup project.
From Build > Configuration Manager be sure that Build and Deploy are enabled for android project.
Rebuild the solution.

Using Swift3 Package Manager with Xcode 8 with no luck

I'm trying to integrate swift package manager in my project, but with no luck. The iOS simulator crashes at startup.
Here are the steps that I followed in order to integrate the package manager:
open xcode and create a new xcodeproject: testcpackage
from the terminal I've run the command:
swift package init to create the Package.swift file
swift package generate-xcodeproj
swift build
swift test - everything seems to be ok
open the new generated file testpackage.xcodeproj in xcode
run the application (cmd+R): build succeeded
first error given by the iOS simulator: Could not attach to pid : “9207”
I close the iOS simulator and I run the project again when I get the 2nd error:
No installable items found at /Users/xxxxxx/Library/Developer/CoreSimulator/Devices/555xxx14-xxx-xx-8E6E-C13D5AB463A0/data/Library/Caches/com.apple.mobile.installd.staging/temp.rA1vGO/extracted/Payload
Could you please help me to solve this issue?
I use the following method to get packages to work in iOS. That being said, I'm not sure if this is the "best" way to do this:
Make starting Package.swift file
swift package generate-xcodeproj
Open project in Xcode
Project : Build Settings : Base SDK ==> change to IOS
Editor : Add Target : (iOS ... Single View App)
Select your project, look at target list, find your newly added target : General : Deployment Info
On toolbar, change "active scheme" to the new target
Run
It has worked for me in the past. However, I have had to fix search paths. I'm currently suffering from that problem here: Xcode: missing required module error
Good luck

Xcode 7 can't detect the customize plugin class of ios cordova project

I coded a iOS plugin for cordova project. My project can run well with My Plugin when i put Plugin Class into Compile Resource of Xcode.
But i have a request which must packed My Plugin into module.framework.
I added module.framework into Link binary with Library of Xcode and link in Frameworks Search Path (Build setting). =>My project can't detect my plugin.
I try call function in module.framework, it's Ok. But run Cordova project has error that can not found plugin in module.framework.(Config.xml already added Plugin Class)
If you have any idea, please help me.
Thank so much!

Ionic build android failed - Could not resolve all dependencies for configuration ':_debugCompile'

I'm added phonegap-plugin-push (http://docs.ionic.io/docs/push-from-scratch) to my project, then after I'm build/run it, the error was appeared.
I've try so many ways (https://github.com/driftyco/ionic-service-push-client/issues/22)
(SDK Manager unable to fetch content - Connection to https://dl-ssl.google.com refused), but nothing can help me.
Before I'm added this plugin, my project was fine.
You can setting file project.properties on yourApp\platforms\android
You can edit cordova.system.library.1=com.android.support:support-v13:23+ to your support version

Resources