• 03-06-2022, 22:35:07
    #1
    Merhaba Flutter uygulamada debug olarak yüklüyorum yüklemede sorun yok ama uygulama açılmadan kapanıyor ve aşağıdaki uyarıları veriyor.

    √ Built buildappoutputsflutter-apkapp-debug.apk.
    Installing buildappoutputsflutter-apkapp.apk...
    E/AndroidRuntime(20751): FATAL EXCEPTION: main
    E/AndroidRuntime(20751): Process: com.ornek, PID: 20751
    E/AndroidRuntime(20751): java.lang.RuntimeException: Unable to instantiate application com.ornek .Application: java.lang.ClassNotFoundException: Didn't find class "com.ornek .Application" on path: DexPathList[[zip file "/data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/base.apk"],nativeLibraryDirectories=[/data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/lib/arm64, /data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
    E/AndroidRuntime(20751): at android.app.LoadedApk.makeApplication(LoadedApk.ja va:1230)
    E/AndroidRuntime(20751): at android.app.ActivityThread.handleBindApplication(A ctivityThread.java:6553)
    E/AndroidRuntime(20751): at android.app.ActivityThread.access$1400(ActivityThr ead.java:224)
    E/AndroidRuntime(20751): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1887)
    E/AndroidRuntime(20751): at android.os.Handler.dispatchMessage(Handler.java:10 7)
    E/AndroidRuntime(20751): at android.os.Looper.loop(Looper.java:224)
    E/AndroidRuntime(20751): at android.app.ActivityThread.main(ActivityThread.jav a:7562)
    E/AndroidRuntime(20751): at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime(20751): at com.android.internal.os.RuntimeInit$MethodAndArgsC aller.run(RuntimeInit.java:539)
    E/AndroidRuntime(20751): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:950)
    E/AndroidRuntime(20751): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ornek .Application" on path: DexPathList[[zip file "/data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/base.apk"],nativeLibraryDirectories=[/data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/lib/arm64, /data/app/com.ornek -D_NV6GkCgQs0vC6oxuO6eA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
    E/AndroidRuntime(20751): at dalvik.system.BaseDexClassLoader.findClass(BaseDex ClassLoader.java:196)
    E/AndroidRuntime(20751): at java.lang.ClassLoader.loadClass(ClassLoader.java:3 79)
    E/AndroidRuntime(20751): at java.lang.ClassLoader.loadClass(ClassLoader.java:3 12)
    E/AndroidRuntime(20751): at android.app.AppComponentFactory.instantiateApplica tion(AppComponentFactory.java:76)
    E/AndroidRuntime(20751): at androidx.core.app.CoreComponentFactory.instantiate Application(CoreComponentFactory.java:52)
    E/AndroidRuntime(20751): at android.app.Instrumentation.newApplication(Instrum entation.java:1156)
    E/AndroidRuntime(20751): at android.app.LoadedApk.makeApplication(LoadedApk.ja va:1222)
    E/AndroidRuntime(20751): ... 9 more



    Gradle dosyası:

    def localProperties = new Properties()
    def localPropertiesFile = rootProject.file('local.properties')
    if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
    localProperties.load(reader)
    }
    }
    
    def flutterRoot = localProperties.getProperty('flutter.sdk')
    if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
    }
    
    def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
    if (flutterVersionCode == null) {
    flutterVersionCode = '1'
    }
    
    def flutterVersionName = localProperties.getProperty('flutter.versionName')
    if (flutterVersionName == null) {
    flutterVersionName = '1.0'
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
    
    def keystoreProperties = new Properties()
    def keystorePropertiesFile = rootProject.file('key.properties')
    if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
    }
    android {
    compileSdkVersion 32
    
    sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
    }
    
    kotlinOptions {
    jvmTarget = '1.8'
    }
    sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
    }
    defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.ornek "
    minSdkVersion 21
    targetSdkVersion 32
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    }
    
    signingConfigs {
    release {
    keyAlias keystoreProperties.getProperty('keyAlias')
    keyPassword keystoreProperties.getProperty('keyPassword')
    storeFile keystoreProperties.getProperty('storeFile') ? file(keystoreProperties.getProperty('storeFile')) : null
    storePassword keystoreProperties.getProperty('storePassword')
    }
    }
    
    
    buildTypes {
    release {
    // TODO: Add your own signing config for the release build.
    // Signing with the debug keys for now, so `flutter run --release` works.
    signingConfig signingConfigs.release
    }
    }
    }
    
    flutter {
    source '../..'
    }
    
    dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation platform('com.google.firebase:firebase-bom:26.2.0')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.android.gms:play-services-ads:21.0.0'
    
    }
    Manifest Dosyası:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.ornek ">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
    calls FlutterMain.startInitialization(this); in its onCreate method.
    In most cases you can leave this as-is, but you if you want to provide
    additional functionality it is fine to subclass or reimplement
    FlutterApplication and put your custom class here. -->
    <application
    android:name=".Application"
    android:label="Ornek Kartlar"
    android:icon="@mipmap/ic_launcher">
    <activity
    android:name=".MainActivity"
    android:exported="true"
    android:launchMode="singleTop"
    android:theme="@style/LaunchTheme"
    android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
    android:hardwareAccelerated="true"
    android:windowSoftInputMode="adjustResize"
    >
    <!-- Specifies an Android theme to apply to this Activity as soon as
    the Android process has started. This theme is visible to the user
    while the Flutter UI initializes. After that, this theme continues
    to determine the Window background behind the Flutter UI. -->
    <meta-data
    android:name="io.flutter.embedding.android.NormalTheme"
    android:resource="@style/NormalTheme"
    />
    <!-- Displays an Android View that continues showing the launch screen
    Drawable until Flutter paints its first frame, then this splash
    screen fades out. A splash screen is useful to avoid any visual
    gap between the end of Android's launch screen and the painting of
    Flutter's first frame. -->
    <meta-data
    android:name="io.flutter.embedding.android.SplashScreenDrawable"
    android:resource="@drawable/launch_background"
    />
    
    <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
    This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
    android:name="flutterEmbedding"
    android:value="2" />
    </application>
    </manifest>
    Pubspec.yaml dosyası

    name: kpssbilgikart
    description: A new Flutter application.
    
    # The following line prevents the package from being accidentally published to
    # pub.dev using `pub publish`. This is preferred for private packages.
    publish_to: 'none' # Remove this line if you wish to publish to pub.dev
    
    # The following defines the version and build number for your application.
    # A version number is three numbers separated by dots, like 1.2.43
    # followed by an optional build number separated by a +.
    # Both the version and the builder number may be overridden in flutter
    # build by specifying --build-name and --build-number, respectively.
    # In Android, build-name is used as versionName while build-number used as versionCode.
    # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
    # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
    # Read more about iOS versioning at
    # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
    version: 1.1.3+43
    
    environment:
    sdk: ">=2.17.1 <3.0.0"
    
    dependencies:
    path_provider: ^2.0.10
    flutter_staggered_animations: ^1.0.0
    flutter_custom_clippers: ^2.0.0
    wave: ^0.2.0
    lottie: ^1.3.0
    confetti: ^0.7.0
    ai_progress: ^2.0.0
    sizer: ^2.0.15
    toast: ^0.3.0
    flutter_speed_dial: ^6.0.0
    badges: ^2.0.2
    url_launcher: ^6.1.2
    rate_my_app: ^1.1.3
    avatar_glow: ^2.0.2
    shimmer_animation: ^2.1.0+1
    shared_preferences: ^2.0.15
    sqflite: ^2.0.2+1
    path: ^1.8.1
    font_awesome_flutter: ^10.1.0
    change_app_package_name: ^1.1.0
    page_view_indicators: ^2.0.0
    cloud_firestore: ^3.1.17
    google_mobile_ads: ^1.2.0
    firebase_core: ^1.17.1
    flutter:
    sdk: flutter
    
    
    # The following adds the Cupertino Icons font to your application.
    # Use with the CupertinoIcons class for iOS style icons.
    cupertino_icons: ^1.0.4
    
    dev_dependencies:
    flutter_test:
    sdk: flutter
    
    # For information on the generic Dart part of this file, see the
    # following page: https://dart.dev/tools/pub/pubspec
    
    # The following section is specific to Flutter.
    flutter:
    assets:
    - adil.jpg
    - global.png
    
    # The following line ensures that the Material Icons font is
    # included with your application, so that you can use the icons in
    # the material Icons class.
    uses-material-design: true
    
    # To add assets to your application, add an assets section, like this:
    # assets:
    # - images/a_dot_burr.jpeg
    # - images/a_dot_ham.jpeg
    
    # An image asset can refer to one or more resolution-specific "variants", see
    # https://flutter.dev/assets-and-images/#resolution-aware.
    
    # For details regarding adding assets from package dependencies, see
    # https://flutter.dev/assets-and-images/#from-packages
    
    # To add custom fonts to your application, add a fonts section here,
    # in this "flutter" section. Each entry in this list should have a
    # "family" key with the font family name, and a "fonts" key with a
    # list giving the asset and other descriptors for the font. For
    # example:
    # fonts:
    # - family: Schyler
    # fonts:
    # - asset: fonts/Schyler-Regular.ttf
    # - asset: fonts/Schyler-Italic.ttf
    # style: italic
    # - family: Trajan Pro
    # fonts:
    # - asset: fonts/TrajanPro.ttf
    # - asset: fonts/TrajanPro_Bold.ttf
    # weight: 700
    #
    # For details regarding fonts from package dependencies,
    # see https://flutter.dev/custom-fonts/#from-packages
  • 04-06-2022, 12:39:06
    #2
    Buraya yazmak yerine Google a yazarsanız çözüm bulursunuz 2 gün önce ben de yaşadım aynısını