After updating firebase last version, MultiDexApplication error started - android-studio

Hi I am codding with Kotlin. Everything was perfect. After adding
implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
lines in build.gradle It started that getting
Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file.................
error.
What is the problem. I am giving some build.gradle files codes.Maybe it is necessary to say somethig. Thanks
apply plugin: 'com.google.gms.google-services'
android {
buildToolsVersion "30.0.3"
compileSdkVersion 30
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
packagingOptions {
exclude 'META-INF/robovm/ios/robovm.xml'
}
defaultConfig {
applicationId "com.mygdx.game"
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true
dependencies
implementation 'com.android.support:multidex:1.0.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.1.1'
implementation 'com.google.firebase:firebase-database:19.7.0'
implementation 'com.google.firebase:firebase-database-ktx:19.7.0'
implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
// implementation 'com.google.firebase:firebase-auth:21.0.1'
eclipse.project.name = appName + "-android"
What is the problem?

Try updating multidex version..

Related

Core Image filter "CIDepthBlurEffect" not working on iOS 11 / Xcode 9.0

I can't get the new CIDepthBlurEffect to work. Am I doing something wrong, or is this a known issue?
Below is my code in Objective-C:
NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES], nil] forKeys:[NSArray arrayWithObjects:kCIImageAuxiliaryDisparity, #"kCIImageApplyOrientationProperty", nil]];
CIImage *disparityImage = [CIImage imageWithData:imageData options:dict];
CIFilter *ciDepthBlurEffect = [CIFilter filterWithName:#"CIDepthBlurEffect"];
[ciDepthBlurEffect setDefaults];
[ciDepthBlurEffect setValue:disparityImage forKey:#"inputDisparityImage"];
[ciDepthBlurEffect setValue:originalImage forKey:#"inputImage"];
CIImage *outputImage = [ciDepthBlurEffect valueForKey:#"outputImage"];
EAGLContext *previewEaglContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
CIContext *context = [CIContext contextWithEAGLContext:previewEaglContext options:#{kCIContextWorkingFormat :[NSNumber numberWithInt:kCIFormatRGBAh]} ];
CGImageRef cgimg = [context createCGImage:disparityImage fromRect:[disparityImage extent]];
image = [[UIImage alloc] initWithCGImage:cgimg];
CGImageRelease(cgimg);
This issue was resolved with the release of Xcode 9 beta 2 and iOS 11 beta 2.

Android Studio inline compiler is not showing red lamp errors

My Android studio is not showing the red lamp when I have an error but gradle does it when I compile the project. The strangest thing is that only happens in .java files, for xml files is working. I have tried to clean project and rebuild, reinitialize Android Studio and I have checked that power save mode is unselected.
My gradle file:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
resources.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
debug {
java.srcDirs = ['src', 'build/generated-sources', 'src-debug']
}
release {
java.srcDirs = ['src', 'build/generated-sources', 'src-release']
}
androidTest.setRoot('project-test')
androidTest {
java.srcDirs = ['project-test/src']
resources.srcDirs = ['project-test/src']
aidl.srcDirs = ['project-test/src']
renderscript.srcDirs = ['project-test/src']
res.srcDirs = ['project-test/res']
assets.srcDirs = ['project-test/assets']
}
}
Also my source folder in project is marked as a "J" inside a red circle.
Does someone knows where is the problem?? Thank you!!
Finally I found the problem. The problem was that somehow in gradle file my src foulder was like a resource foulder:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
--> resources.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
...
}
I changed this line like this:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
....
}
I hope this can be useful for other people!

Swift- audio implementation crash: "EXC_BAD_INSTRUCTION"

I am trying to put audio into my app and I put in the following code and placed my mp3 audio file in my assets folder, and it crashed with: "EXC_BAD_INSTRUCTION(code=EXC_1386_INVOP, subcode=0x0)"
I could really use some help on what I'm doing wrong/ where I need to put the audio file.
My code:
import UIKit
import AVFoundation
class ViewController: UIViewController {
var audioPlayer = AVAudioPlayer()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
ScrollView.scrollEnabled = true
ScrollView.contentSize = CGSize(width:473, height: 112)
changer = 0
tapView.hidden = true
yoohooView.hidden = true
var alertSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Untitled", ofType: "mp3")!) //Crashes here
println(alertSound)
// Removed deprecated use of AVAudioSessionDelegate protocol
AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil)
AVAudioSession.sharedInstance().setActive(true, error: nil)
var error:NSError?
audioPlayer = AVAudioPlayer(contentsOfURL: alertSound, error: &error)
audioPlayer.prepareToPlay()
audioPlayer.play()
}
class ViewController: UIViewController {
var audioPlayer = AVAudioPlayer()
#IBOutlet weak var svScrollView: UIScrollView!
override func viewDidLoad() {
super.viewDidLoad()
svScrollView.scrollEnabled = true
svScrollView.contentSize = CGSize(width:473, height: 112)
var alertSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("myMusic", ofType: "mp3")!)
println(alertSound)
AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil)
AVAudioSession.sharedInstance().setActive(true, error: nil)
var error:NSError?
audioPlayer = AVAudioPlayer(contentsOfURL: alertSound, error: &error)
audioPlayer.prepareToPlay()
audioPlayer.play()
}
}
I tried above code. . . and it's fine to work for me . . .
Please try this . . .

GroovyFX application run with gradle

i have the next sample (from groovyfx site), it's simple window.
import static groovyx.javafx.GroovyFX.start
start {
stage(title: 'GroovyFX Hello World', visible: true) {
scene(fill: BLACK, width: 700, height: 250) {
hbox(padding: 60) {
text(text: 'Groovy', font: '80pt sanserif') {
fill linearGradient(endX: 0, stops: [PALEGREEN, SEAGREEN])
}
text(text: 'FX', font: '80pt sanserif') {
fill linearGradient(endX: 0, stops: [CYAN, DODGERBLUE])
effect dropShadow(color: DODGERBLUE, radius: 25, spread: 0.25)
}
}
}
}
}
How to run it with gradle run ?
my build.gradle:
apply plugin: 'groovy'
sourceCompatibility = 1.8
targetCompatibility = 1.8
project.ext.set('javafxHome', System.env['JAVAFX_HOME'])
repositories {
mavenCentral()
}
configurations {
ivy
}
dependencies {
ivy "org.apache.ivy:ivy:2.3.0"
compile 'org.codehaus.groovy:groovy-all:2.3.6'
compile 'org.codehaus.groovyfx:groovyfx:0.4.0'
compile files("${javafxHome}/rt/lib/jfxrt.jar")
}
tasks.withType(GroovyCompile) {
groovyClasspath += configurations.ivy
}
I might run it from IDE, but how to run it with cli and then build jar with path to Main class?
It works in the following configuration.
Structure:
build.gradle
src/
main
groovy
Main.groovy
build.gradle
apply plugin: 'groovy'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
ivy
}
dependencies {
ivy "org.apache.ivy:ivy:2.3.0"
compile 'org.codehaus.groovy:groovy-all:2.3.6'
compile 'org.codehaus.groovyfx:groovyfx:0.4.0'
compile files("${System.getenv('JAVA_HOME')}/jre/lib/ext/jfxrt.jar")
}
tasks.withType(GroovyCompile) {
groovyClasspath += configurations.ivy
}
task run(type: JavaExec) {
main = 'Main'
classpath sourceSets.main.runtimeClasspath
}
Main.groovy
import static groovyx.javafx.GroovyFX.start
start {
stage(title: 'GroovyFX Hello World', visible: true) {
scene(fill: BLACK, width: 700, height: 250) {
hbox(padding: 60) {
text(text: 'Groovy', font: '80pt sanserif') {
fill linearGradient(endX: 0, stops: [PALEGREEN, SEAGREEN])
}
text(text: 'FX', font: '80pt sanserif') {
fill linearGradient(endX: 0, stops: [CYAN, DODGERBLUE])
effect dropShadow(color: DODGERBLUE, radius: 25, spread: 0.25)
}
}
}
}
}
Have You already seen this site?

Wikitude app crash (poi adding issue) in iPhone 4.0

I am currently working in iPhone augmentation reality application in which I have added poi over camera view, but my application is crash and it's throwing an exception (CALayer NAN 15).
Following is the code that I am using.
wikitudeAR = [[WikitudeARViewController alloc] initWithDelegate:self applicationPackage:nil applicationKey:nil; applicationName:nil developerName:nil];
- (void) verificationDidSucceed {
id appDelegate=[[UIApplication sharedApplication]delegate];
UIWindow *window = [appDelegate window];
[window addSubview:[wikitudeAR start];
}
- (void) verificationDidFail {
}
- (void) didUpdateToLocation: (CLLocation*) newLocation
fromLocation: (CLLocation*) oldLocation {
}
-(void) APIFinishedLoading
{ //arr is current location data
NSMutableArray *addPOIData=[[NSMutableArray alloc]init];
for(int i=0;i<[arr count];i++)
{
NSDictionary *dict= [arr objectAtIndex:i];
WTPoi* poi = [[WTPoi alloc] initWithName:currentMapLocation.locationTitle AndLatitude:[[dict objectforKey:#"lat"]doubleValue]AndLongitude:[[dict objectforKey:#"long"]doubleValue]];
poi.icon = #"http://img560.imageshack.us/img560/9931/parking.png";
poi.shortDescription = #"Open Monday to Friday 6:30 to 7pm. Tariff plan range from £5";
poi.thumbnail = #"http://img560.imageshack.us/img560/9931/parking.png";
[addPOIData addObject: poi];
[poi release];
}
[[WikitudeARViewController sharedInstance] addPOIs: addPOIData];
[addPOIData release];
}
Please try the new version of the Wikitude iPhone API which should fix the described issue. You can download it from http://www.wikitude.org/developers
Cheers, Nicolas

Resources