cv-library / phonegap-plugin-dropbox-chooser

Dropbox Chooser plugin for Cordova/Phonegap
Other
8 stars 11 forks source link

The android build fails with error: cannot access fragment #5

Open gaurav-chandra opened 9 years ago

gaurav-chandra commented 9 years ago

Hi,

When I am building for android targetsdk=22 from command line, the build fails with an error:

platforms/android/src/uk/co/cv_library/plugins/DropboxChooser.java:46: error: cannot access Fragment

.launch(cordova.getActivity(), DBX_CHOOSER_REQUEST); ^ class file for android.support.v4.app.Fragment not found

This is preventing me to use the plugin. Incase of IOS the plugin works fine.

abdulhafeez commented 9 years ago

I am also building for android sdk 4.4.2, API level 19 using sencha cmd which in turn uses cordova command line. I am getting exactly the same error as mentioned by gaurav-chandra above. The plugin is useless until this error is resolved. It prevents the build.

abdulhafeez commented 9 years ago

OK, I was able to fix this by placing android-support-v4.jar in the cordova/platforms/android/libs directory before running the build command. It was built successfully after that and runs OK on the android device ... cheers