giandifra / simple_share

A Flutter plugin for share image, video or file
MIT License
18 stars 15 forks source link

package android.support.v4.content does not exist #5

Closed pablanka closed 5 years ago

pablanka commented 5 years ago

I have this error when I try to run the app.

/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/FileHelper.java:9: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
                                 ^
/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/ShareHelper.java:7: error: cannot find symbol
import android.support.v4.app.ShareCompat;
                             ^
  symbol:   class ShareCompat
  location: package android.support.v4.app
/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/ShareHelper.java:15: error: package ShareCompat does not exist
    private ShareCompat.IntentBuilder intentBuilder;
                       ^
/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/FileHelper.java:122: error: cannot find symbol
                return FileProvider.getUriForFile(registrar.context(), this.authorities, sharedFile);
                       ^
  symbol:   variable FileProvider
  location: class FileHelper
/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/FileHelper.java:128: error: cannot find symbol
            return FileProvider.getUriForFile(registrar.context(), authorities, new File(uri.getPath()));
                   ^
  symbol:   variable FileProvider
  location: class FileHelper
/Users/siteplan/development/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/android/src/main/kotlin/com/juanito21/simpleshare/src/ShareHelper.java:19: error: package ShareCompat does not exist
        this.intentBuilder = ShareCompat.IntentBuilder.from(this.registrar.activity());
                                        ^
6 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':simple_share:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
giandifra commented 5 years ago

the example project work?

pablanka commented 5 years ago

Yes it does! The problem would be in my project configuration..