-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creation fails due to code which is written multiple times in MainActivity.kt #19
Comments
same for me, |
Thanks for reporting. Version 0.1.8+1 was looking for the wrong variable on This is now fixed in 0.1.8+2 by looking for the correct variable .(53e6b55) Please update the package, remove the duplicated code on dev_dependencies:
flutter_native_splash: ^0.1.8+2
Below is the original Java package com.example.test;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
} Kotlin package com.example.test
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}
If you copy-paste this don't forget to change |
@henriquearthur works like a charm now. Appreciate the hard work. <3 |
Thank you for the fast fix! Keep up the great work! I just changed the image size and now it works alright. |
Some initialization of variables are added even though they exist already.
Even if I delete those lines and resolve the build errors, the image appears too big on my emulator. Even after a clean and rebuild.
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (8, 19): Conflicting import, imported name 'Build' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (9, 21): Conflicting import, imported name 'ViewTreeObserver' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (10, 21): Conflicting import, imported name 'WindowManager' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (12, 19): Conflicting import, imported name 'Build' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (13, 21): Conflicting import, imported name 'ViewTreeObserver' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (14, 21): Conflicting import, imported name 'WindowManager' is ambiguous
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (19, 9): Conflicting declarations: val flutter_native_splash: Boolean, val flutter_native_splash: Boolean
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (20, 9): Conflicting declarations: var originalStatusBarColor: Int, var originalStatusBarColor: Int
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (25, 9): Conflicting declarations: val originalStatusBarColorFinal: Int, val originalStatusBarColorFinal: Int
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (27, 9): Conflicting declarations: val flutter_native_splash: Boolean, val flutter_native_splash: Boolean
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (28, 9): Conflicting declarations: var originalStatusBarColor: Int, var originalStatusBarColor: Int
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (33, 9): Conflicting declarations: val originalStatusBarColorFinal: Int, val originalStatusBarColorFinal: Int
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (36, 9): Conflicting declarations: val vto: ViewTreeObserver!, val vto: ViewTreeObserver!
e: C:\Users\Gaming PC\Desktop\LinkYouProjectfiles\LinkYou\android\app\src\main\kotlin\de\linkyouapp\linkyou\MainActivity.kt: (47, 9): Conflicting declarations: val vto: ViewTreeObserver!, val vto: ViewTreeObserver!
FAILURE: Build failed with an exception.
Execution failed for task ':app:compileDebugKotlin'.
The text was updated successfully, but these errors were encountered: