0

my problem is that

import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import javafx.scene.media.MediaPlayer;
import javafxports.android.FXActivity;

return The import android cannot be resolved. although the class containing those imports is inside the android folder in the gluon single view project and the sdk is referenced.

  • I am trying https://stackoverflow.com/users/3956070/josé-pereda 's solution Here https://stackoverflow.com/questions/38419634/javafxports-how-to-call-android-native-media-player – Hassan Abdul Ghaffar Nov 26 '17 at 11:09
  • What's your IDE? Can you try this [sample](https://github.com/gluonhq/gluon-samples/tree/master/go-native)? – José Pereda Nov 26 '17 at 12:15
  • my IDE is eclipse , I tried this sample and same error "The import android cannot be resolved" – Hassan Abdul Ghaffar Nov 26 '17 at 12:22
  • It's a known issue that Eclipse doesn't resolve the Android and JavaFXPorts dependencies. So you have to do it yourself, including them in the build file, like standard dependencies – José Pereda Nov 26 '17 at 12:26
  • I did, eclipse is no more complaining. However Mediaplayer is complaining because it does not have an empty constructor as used here https://stackoverflow.com/questions/38419634/javafxports-how-to-call-android-native-media-player – Hassan Abdul Ghaffar Nov 26 '17 at 12:52
  • You are importing the wrong MediaPlayer ... – José Pereda Nov 26 '17 at 12:54

0 Answers0