lubritto / flutter_share

A Flutter plugin for IOS and Android providing a simple way to share a message, link or local files.
MIT License
42 stars 50 forks source link

App not starting after adding provider in XML #18

Open aryan29 opened 4 years ago

aryan29 commented 4 years ago
Launching lib/main.dart on ASUS X00TD in debug mode...
Note: /home/aryan/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/device_apps-1.0.9/android/src/main/java/fr/g123k/deviceapps/DeviceAppsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        37.0s
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...                        22.9s

After this nothing happens my app doesnt open at all I have completed the initial setup
App is crashing but I cant get whats the reason

Flutter 1.17.1 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (11 days ago) •
2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2
PichuChen commented 4 years ago

I found that App won't start when

android:exported="true"

And will start when

android:exported="false"
PhilipPurwoko commented 3 years ago
Launching lib/main.dart on ASUS X00TD in debug mode...
Note: /home/aryan/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/device_apps-1.0.9/android/src/main/java/fr/g123k/deviceapps/DeviceAppsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        37.0s
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...                        22.9s

After this nothing happens my app doesnt open at all I have completed the initial setup App is crashing but I cant get whats the reason

Flutter 1.17.1 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (11 days ago) •
2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2

Same here

Note: D:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_share-2.0.0\android\src\main\java\com\example\fluttershare\FlutterSharePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Exited (1)

Setting android:exported="false" didn't help for me

PhilipPurwoko commented 3 years ago

I change the minSdkVersion from 17 to 21 in app/src/build.gradle and works perfectly

android {
    compileSdkVersion 30

    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.example.flutproject"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    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.debug
        }
    }
}