pbakondy / cordova-plugin-sim

:cherries: A cordova plugin to get the device's SIM data (carrier name, mcc mnc, country code, telephonenumber, etc)
MIT License
163 stars 100 forks source link

Two compile errors on Cordova build #20

Closed rolinger closed 8 years ago

rolinger commented 8 years ago

Expected behaviour

Compile without issue

Actual behaviour

I received the following two compile errors and couldn't find any google searches to match the errors

C:\Users\RPO\dev\app\platforms\android\src\com\pbakondy\Sim.java:134: error ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ (pointing to '.' between after ContextCompat) symbol: method checkSelfPermission(Activity,String) location: class ContextCompat

C:\Users\RPO\dev\app\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find sym ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ (pointing to '.' after ActivityCompat) symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat

I'm seeing this behaviour on

Remove this hint: these checkboxes can be checked like this: [x]

Example: Samsung Galaxy S6, iPhone 6s

OS versions

Example: Android 4.4.2, iOS 9.2

I've checked these

Provide the used components versions (cordova, ionic, etc).

Provide the steps to reproduce the issue.

Provide files, sources if available.

pbakondy commented 8 years ago

What is the result of ionic info ?

rolinger commented 8 years ago

Here is some more info I was able to capture from my console buffer...I have already uninstalled the sms plugin and dropped/re-added the Android platform. I would need to go through it all again to retrieve more info. I am willing to do that if you think the info below still isn't sufficient for you. Let me know. -Russel :compileDebugJava C:\Users\RPO\dev\myApp\platforms\android\src\com\pbakondy\Sim.java:134: error: cannot find symbol ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ (points to "." after ContextCompat) symbol: method checkSelfPermission(Activity,String) location: class ContextCompat C:\Users\RPO\dev\myApp\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ (points to "." after ActivityCompat) symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat

And then when I remove the plugin I then get the following error:======================================:preDexDebug:dexDebugUNEXPECTED TOP-LEVEL EXCEPTION:com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171) at com.android.dx.merge.DexMerger.merge(DexMerger.java:189) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) FAILED FAILURE: Build failed with an exception.

Date: Thu, 10 Mar 2016 06:33:48 -0800 From: notifications@github.com To: cordova-plugin-sim@noreply.github.com CC: rolinger1@hotmail.com Subject: Re: [cordova-plugin-sim] Two compile errors on Cordova build (#20)

What is the result of ionic info ?

— Reply to this email directly or view it on GitHub.

pbakondy commented 8 years ago

So it is solved?

rolinger commented 8 years ago

If uninstalling cordova-plugin-sms and reloading the Android platform means "resolved", then yes. LOL. No...its not solved, every time I loaded the plugin it gave those errors I previously sent you.

-Russel

Date: Thu, 10 Mar 2016 06:46:47 -0800 From: notifications@github.com To: cordova-plugin-sim@noreply.github.com CC: rolinger1@hotmail.com Subject: Re: [cordova-plugin-sim] Two compile errors on Cordova build (#20)

So it is solved?

— Reply to this email directly or view it on GitHub.

pbakondy commented 8 years ago

Lets try a minimum config with this plugin only.

What is the result of the following?

cordova -v
cordova create testing
cd testing
cordova plugin add cordova-plugin-sim
cordova build android
rolinger commented 8 years ago

Ok...will load a test platform, will start with each plugin, compile then load the next to see where the conflict is coming from. Get to it in a few hours and get back to you

Sent from my mobile device.

On Thu, Mar 10, 2016 at 6:52 AM -0800, "Peter Bakondy" notifications@github.com wrote:

Lets try a minimum config with this plugin only.

What is the result of the following?

cordova -v
cordova create testing
cd testing
cordova plugin add cordova-plugin-sim
cordova build android

Reply to this email directly or view it on GitHub: https://github.com/pbakondy/cordova-plugin-sim/issues/20#issuecomment-194884471

rolinger commented 8 years ago

I did a clean testApp install...loaded the android platform and then added the cordova-plugin-sms as the FIRST plugin and compiled...and it errored out immediately with the same errors as before. The conflict must be with some android platform code.

Below is the entire build process:

C:\Users\RPO\dev>ionic start testApp tabsCreating Ionic app in folder C:\Users\RPO\dev\testApp based on tabs projectDownloading: https://github.com/driftyco/ionic-app-base/archive/master.zip[=============================] 100% 0.0sDownloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip[=============================] 100% 0.0sUpdated the hooks directory to have execute permissionsUpdate Config.xmlInitializing cordova project Your Ionic project is ready to go! Some quick tips:

New! Add push notifications to your Ionic app with Ionic Push (alpha)!https://apps.ionic.io/signup+---------------------------------------------------------++ New Ionic Updates for March 2016++ The View App just landed. Preview your apps on any device+ http://view.ionic.io++ Invite anyone to preview and test your app+ ionic share EMAIL++ Generate splash screens and icons with ionic resource+ http://ionicframework.com/blog/automating-icons-and-splash-screens/++---------------------------------------------------------+ C:\Users\RPO\dev>cd testApp C:\Users\RPO\dev\testApp>npm install -g gulpnpm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.C:\Users\RPO\AppData\Roaming\npm\gulp -> C:\Users\RPO\AppData\Roaming\npm\node_modules\gulp\bin\gulp.jsgulp@3.9.1 C:\Users\RPO\AppData\Roaming\npm\node_modules\gulp├── pretty-hrtime@1.0.2├── interpret@1.0.0├── deprecated@0.0.1├── archy@1.0.0├── minimist@1.2.0├── tildify@1.1.2 (os-homedir@1.0.1)├── v8flags@2.0.11 (user-home@1.1.1)├── semver@4.3.6├── chalk@1.1.1 (escape-string-regexp@1.0.5, supports-color@2.0.0, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0)├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)├── liftoff@2.2.0 (rechoir@0.6.2, extend@2.0.1, flagged-respawn@0.3.1, resolve@1.1.7, findup-sync@0.3.0)├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, defaults@1.0.3, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)└── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reescape@3.0.0, beeper@1.1.0, lodash._reevaluate@3.0.0, lodash._reinterpolate@3.0.0, object-assign@3.0.0, replace-ext@0.0.1, has-gulplog@0.1.0, fancy-log@1.2.0, vinyl@0.5.3, gulplog@1.0.0, lodash.template@3.6.2, multipipe@0.1.2, through2@2.0.1, dateformat@1.0.12) C:\Users\RPO\dev\testApp>npm install gulp --save-devnpm WARN package.json testapp@1.1.1 No repository field.npm WARN package.json testapp@1.1.1 No README datanpm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.gulp@3.9.1 node_modules\gulp├── interpret@1.0.0├── pretty-hrtime@1.0.2├── deprecated@0.0.1├── archy@1.0.0├── minimist@1.2.0├── tildify@1.1.2 (os-homedir@1.0.1)├── v8flags@2.0.11 (user-home@1.1.1)├── semver@4.3.6├── chalk@1.1.1 (escape-string-regexp@1.0.5, supports-color@2.0.0, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0)├── orchestrator@0.3.7 (sequencify@0.0.7, stream-consume@0.1.0, end-of-stream@0.1.5)├── liftoff@2.2.0 (extend@2.0.1, rechoir@0.6.2, flagged-respawn@0.3.1, findup-sync@0.3.0, resolve@1.1.7)├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, defaults@1.0.3, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)└── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, beeper@1.1.0, object-assign@3.0.0, replace-ext@0.0.1, has-gulplog@0.1.0, fancy-log@1.2.0, gulplog@1.0.0, vinyl@0.5.3, lodash.template@3.6.2, through2@2.0.1, multipipe@0.1.2, dateformat@1.0.12) C:\Users\RPO\dev\testApp>cordova plugincom.ionic.keyboard 1.0.4 "Keyboard"cordova-plugin-console 1.0.2 "Console"cordova-plugin-device 1.1.1 "Device"cordova-plugin-splashscreen 3.2.0 "Splashscreen"cordova-plugin-whitelist 1.2.1 "Whitelist" C:\Users\RPO\dev\testApp>cordova platform add androidAdding android project...Creating Cordova project for the Android platform: Path: platforms\android Package: com.ionicframework.testapp120680 Name: testApp Activity: MainActivity Android target: android-22Copying template files...Android project created with cordova-android@4.0.0Running command: "C:\Program Files\nodejs\node.exe" C:\Users\RPO\dev\testApp\hooks\after_prepare\010_add_platform_class.js C:\Users\RPO\dev\testAppadd to body class: platform-androidInstalling "com.ionic.keyboard" for androidInstalling "cordova-plugin-console" for androidInstalling "cordova-plugin-device" for androidInstalling "cordova-plugin-splashscreen" for androidInstalling "cordova-plugin-whitelist" for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do not need this plugin since the whitelist will be built in.

C:\Users\RPO\dev\testApp>cordova plugin add cordova-plugin-simFetching plugin "cordova-plugin-sim" via npmnpm http GET https://registry.npmjs.org/cordova-plugin-simnpm http 304 https://registry.npmjs.org/cordova-plugin-simInstalling "cordova-plugin-sim" for android C:\Users\RPO\dev\testApp>ionic build androidUpdated the hooks directory to have execute permissionsRunning command: "C:\Program Files\nodejs\node.exe" C:\Users\RPO\dev\testApp\hooks\after_prepare\010_add_platform_class.js C:\Users\RPO\dev\testAppadd to body class: platform-androidRunning command: C:\Users\RPO\dev\testApp\platforms\android\cordova\build.batANDROID_HOME=C:\Users\RPO\AppData\Local\Android\sdkJAVA_HOME=C:\program files\java\jdk1.8.0_40Running: C:\Users\RPO\dev\testApp\platforms\android\gradlew cdvBuildDebug -b C:\Users\RPO\dev\testApp\platforms\android\build.gradle -Dorg.gradle.daemon=true:preBuild:compileDebugNdk:preDebugBuild:checkDebugManifest:CordovaLib:compileLint:CordovaLib:copyDebugLint UP-TO-DATE:CordovaLib:mergeDebugProguardFiles:CordovaLib:preBuild:CordovaLib:preDebugBuild:CordovaLib:checkDebugManifest:CordovaLib:prepareDebugDependencies:CordovaLib:compileDebugAidl:CordovaLib:compileDebugRenderscript:CordovaLib:generateDebugBuildConfig:CordovaLib:generateDebugAssets UP-TO-DATE:CordovaLib:mergeDebugAssets:CordovaLib:generateDebugResValues:CordovaLib:generateDebugResources:CordovaLib:packageDebugResources:CordovaLib:processDebugManifest:CordovaLib:processDebugResources:CordovaLib:generateDebugSources:CordovaLib:compileDebugJavaNote: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE:CordovaLib:packageDebugJar:CordovaLib:compileDebugNdk:CordovaLib:packageDebugJniLibs UP-TO-DATE:CordovaLib:packageDebugLocalJar UP-TO-DATE:CordovaLib:packageDebugRenderscript UP-TO-DATE:CordovaLib:bundleDebug:prepareAndroidCordovaLibUnspecifiedDebugLibrary:preReleaseBuild:CordovaLib:copyReleaseLint UP-TO-DATE:CordovaLib:mergeReleaseProguardFiles:CordovaLib:preReleaseBuild:CordovaLib:checkReleaseManifest:CordovaLib:prepareReleaseDependencies:CordovaLib:compileReleaseAidl:CordovaLib:compileReleaseRenderscript:CordovaLib:generateReleaseBuildConfig:CordovaLib:generateReleaseAssets UP-TO-DATE:CordovaLib:mergeReleaseAssets:CordovaLib:generateReleaseResValues:CordovaLib:generateReleaseResources:CordovaLib:packageReleaseResources:CordovaLib:processReleaseManifest:CordovaLib:processReleaseResources:CordovaLib:generateReleaseSources:CordovaLib:compileReleaseJavaNote: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processReleaseJavaRes UP-TO-DATE:CordovaLib:packageReleaseJar:CordovaLib:compileReleaseNdk:CordovaLib:packageReleaseJniLibs UP-TO-DATE:CordovaLib:packageReleaseLocalJar UP-TO-DATE:CordovaLib:packageReleaseRenderscript UP-TO-DATE:CordovaLib:bundleRelease:prepareComAndroidSupportSupportV42211Library:prepareDebugDependencies:compileDebugAidl:compileDebugRenderscript:generateDebugBuildConfig:generateDebugAssets UP-TO-DATE:mergeDebugAssets:generateDebugResValues:generateDebugResources:mergeDebugResources:processDebugManifest:processDebugResources:generateDebugSources:compileDebugJavaC:\Users\RPO\dev\testApp\platforms\android\src\com\pbakondy\Sim.java:134: error: cannot find symbol ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ symbol: method checkSelfPermission(Activity,String) location: class ContextCompatC:\Users\RPO\dev\testApp\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompatNote: Some input files use or override a deprecated API.Note: Recompile with -Xlint:deprecation for details.2 errors FAILED FAILURE: Build failed with an exception.

-R

Date: Thu, 10 Mar 2016 06:52:07 -0800 From: notifications@github.com To: cordova-plugin-sim@noreply.github.com CC: rolinger1@hotmail.com Subject: Re: [cordova-plugin-sim] Two compile errors on Cordova build (#20)

Lets try a minimum config with this plugin only.

What is the result of the following?

cordova -v cordova create testing cd testing cordova plugin add cordova-plugin-sim cordova build android

— Reply to this email directly or view it on GitHub.

pbakondy commented 8 years ago

Could you please use the github interface to copy-paste these long messages? It is really hard to read it.

Could you please run the exact commands I wrote in my previous comment?

What component versions are you using? ionic, cordova, npm, node, Android Studio, Android SDK, etc.

rolinger commented 8 years ago

Just realized i posted it to the wrong github plugin, when i get home i will repost it to yours and let you know its up

Sent from my mobile device.

On Thu, Mar 10, 2016 at 8:49 AM -0800, "Peter Bakondy" notifications@github.com wrote:

Could you please use the github interface to copy-paste these long messages? It is really hard to read it.

Could you please run the exact commands I wrote in my previous comment?

What component versions are you using? ionic, cordova, npm, node, Android Studio, Android SDK, etc.


Reply to this email directly or view it on GitHub: https://github.com/pbakondy/cordova-plugin-sim/issues/20#issuecomment-194947823

rolinger commented 8 years ago

I did a clean testApp install...loaded the android platform and then added the cordova-plugin-sms as the FIRST plugin and compiled...and it errored out immediately with the same errors as before. The conflict must be with some android platform code.

"Could you please run the exact commands I wrote in my previous comment? : I did

What component versions are you using? ionic : v1.5.0 cordova: v5.0.0 npm: v2.7.4 node: v0.12.2 Android Studio: v1.2 Build 141.1890965 Android SDK Platform: v22 with SDK Build Tools v 19.1 thru 23.0.1

Android API 23 (6.0) is not installed.

Below is the entire build process:

C:\Users\RPO\dev>ionic start testApp tabs Creating Ionic app in folder C:\Users\RPO\dev\testApp based on tabs project Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip [=============================] 100% 0.0s Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip [=============================] 100% 0.0s Updated the hooks directory to have execute permissions Update Config.xml Initializing cordova project

Your Ionic project is ready to go! Some quick tips:

For more help use ionic --help or ionic docs

Visit the Ionic docs: http://ionicframework.com/docs

New! Add push notifications to your Ionic app with Ionic Push (alpha)! https://apps.ionic.io/signup +---------------------------------------------------------+

C:\Users\RPO\dev>cd testApp

C:\Users\RPO\dev\testApp>npm install -g gulp npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0. 0 as soon as possible. npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0. 0 as soon as possible. C:\Users\RPO\AppData\Roaming\npm\gulp -> C:\Users\RPO\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js gulp@3.9.1 C:\Users\RPO\AppData\Roaming\npm\node_modules\gulp ├── pretty-hrtime@1.0.2 ├── interpret@1.0.0 ├── deprecated@0.0.1 ├── archy@1.0.0 ├── minimist@1.2.0 ├── tildify@1.1.2 (os-homedir@1.0.1) ├── v8flags@2.0.11 (user-home@1.1.1) ├── semver@4.3.6 ├── chalk@1.1.1 (escape-string-regexp@1.0.5, supports-color@2.0.0, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0) ├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5) ├── liftoff@2.2.0 (rechoir@0.6.2, extend@2.0.1, flagged-respawn@0.3.1, resolve@1.1.7, findup-sync@0.3.0) ├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, defaults@1.0.3, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob -watcher@0.0.6) └── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reescape@3.0.0, beeper@1.1.0, lodash._reevaluate@3.0.0, lodash._reinterpo late@3.0.0, object-assign@3.0.0, replace-ext@0.0.1, has-gulplog@0.1.0, fancy-log@1.2.0, vinyl@0.5.3, gulplog@1.0.0, lodash.template@3.6.2, m ultipipe@0.1.2, through2@2.0.1, dateformat@1.0.12)

C:\Users\RPO\dev\testApp>npm install gulp --save-dev npm WARN package.json testapp@1.1.1 No repository field. npm WARN package.json testapp@1.1.1 No README data npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0. 0 as soon as possible. npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0. 0 as soon as possible. gulp@3.9.1 node_modules\gulp ├── interpret@1.0.0 ├── pretty-hrtime@1.0.2 ├── deprecated@0.0.1 ├── archy@1.0.0 ├── minimist@1.2.0 ├── tildify@1.1.2 (os-homedir@1.0.1) ├── v8flags@2.0.11 (user-home@1.1.1) ├── semver@4.3.6 ├── chalk@1.1.1 (escape-string-regexp@1.0.5, supports-color@2.0.0, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0) ├── orchestrator@0.3.7 (sequencify@0.0.7, stream-consume@0.1.0, end-of-stream@0.1.5) ├── liftoff@2.2.0 (extend@2.0.1, rechoir@0.6.2, flagged-respawn@0.3.1, findup-sync@0.3.0, resolve@1.1.7) ├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, defaults@1.0.3, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob -watcher@0.0.6) └── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, be eper@1.1.0, object-assign@3.0.0, replace-ext@0.0.1, has-gulplog@0.1.0, fancy-log@1.2.0, gulplog@1.0.0, vinyl@0.5.3, lodash.template@3.6.2, t hrough2@2.0.1, multipipe@0.1.2, dateformat@1.0.12)

C:\Users\RPO\dev\testApp>cordova plugin com.ionic.keyboard 1.0.4 "Keyboard" cordova-plugin-console 1.0.2 "Console" cordova-plugin-device 1.1.1 "Device" cordova-plugin-splashscreen 3.2.0 "Splashscreen" cordova-plugin-whitelist 1.2.1 "Whitelist"

C:\Users\RPO\dev\testApp>cordova platform add android Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.ionicframework.testapp120680 Name: testApp Activity: MainActivity Android target: android-22 Copying template files... Android project created with cordova-android@4.0.0 Running command: "C:\Program Files\nodejs\node.exe" C:\Users\RPO\dev\testApp\hooks\after_prepare\010_add_platform_class.js C:\Users\RPO\dev\ testApp add to body class: platform-android Installing "com.ionic.keyboard" for android Installing "cordova-plugin-console" for android Installing "cordova-plugin-device" for android Installing "cordova-plugin-splashscreen" for android Installing "cordova-plugin-whitelist" for android

           This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you

do not need this plugin since the whitelist will be built in.

C:\Users\RPO\dev\testApp>cordova plugin add cordova-plugin-sim Fetching plugin "cordova-plugin-sim" via npm npm http GET https://registry.npmjs.org/cordova-plugin-sim npm http 304 https://registry.npmjs.org/cordova-plugin-sim Installing "cordova-plugin-sim" for android

C:\Users\RPO\dev\testApp>ionic build android Updated the hooks directory to have execute permissions Running command: "C:\Program Files\nodejs\node.exe" C:\Users\RPO\dev\testApp\hooks\after_prepare\010_add_platform_class.js C:\Users\RPO\dev\ testApp add to body class: platform-android Running command: C:\Users\RPO\dev\testApp\platforms\android\cordova\build.bat ANDROID_HOME=C:\Users\RPO\AppData\Local\Android\sdk JAVA_HOME=C:\program files\java\jdk1.8.0_40 Running: C:\Users\RPO\dev\testApp\platforms\android\gradlew cdvBuildDebug -b C:\Users\RPO\dev\testApp\platforms\android\build.gradle -Dorg.g radle.daemon=true :preBuild :compileDebugNdk :preDebugBuild :checkDebugManifest :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles :CordovaLib:preBuild :CordovaLib:preDebugBuild :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugAidl :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugBuildConfig :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:processDebugManifest :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:compileDebugJavaNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:packageDebugJar :CordovaLib:compileDebugNdk :CordovaLib:packageDebugJniLibs UP-TO-DATE :CordovaLib:packageDebugLocalJar UP-TO-DATE :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:bundleDebug :prepareAndroidCordovaLibUnspecifiedDebugLibrary :preReleaseBuild :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles :CordovaLib:preReleaseBuild :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseAidl :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseBuildConfig :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:processReleaseManifest :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:compileReleaseJavaNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:packageReleaseJar :CordovaLib:compileReleaseNdk :CordovaLib:packageReleaseJniLibs UP-TO-DATE :CordovaLib:packageReleaseLocalJar UP-TO-DATE :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:bundleRelease :prepareComAndroidSupportSupportV42211Library :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugAssets UP-TO-DATE :mergeDebugAssets :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :compileDebugJavaC:\Users\RPO\dev\testApp\platforms\android\src\com\pbakondy\Sim.java:134: error: cannot find symbol ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ symbol: method checkSelfPermission(Activity,String) location: class ContextCompat C:\Users\RPO\dev\testApp\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 15.959 secs

C:\Users\RPO\dev\testApp\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s /c "C:\Users\RPO\dev\testApp\platforms\android\gradlew cdvBuildDebug -b C:\Users\RPO\dev\testApp \platforms\android\build.gradle -Dorg.gradle.daemon=true" ERROR building one of the platforms: Error: C:\Users\RPO\dev\testApp\platforms\android\cordova\build.bat: Command failed with exit code 1 You may not have the required environment or OS to build this project Error: C:\Users\RPO\dev\testApp\platforms\android\cordova\build.bat: Command failed with exit code 1 at ChildProcess.whenDone (C:\Users\RPO\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:2 3) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

rolinger commented 8 years ago

it is now uploaded to github

-R

Date: Thu, 10 Mar 2016 08:49:20 -0800 From: notifications@github.com To: cordova-plugin-sim@noreply.github.com CC: rolinger1@hotmail.com Subject: Re: [cordova-plugin-sim] Two compile errors on Cordova build (#20)

Could you please use the github interface to copy-paste these long messages?

It is really hard to read it.

Could you please run the exact commands I wrote in my previous comment?

What component versions are you using?

ionic, cordova, npm, node, Android Studio, Android SDK, etc.

— Reply to this email directly or view it on GitHub.

pbakondy commented 8 years ago

I still can not reproduce this issue.

First upgrade ionic and cordova packages:

npm install -g ionic cordova

After that run these exact commands. Do not use ionic. Do not run gulp. Only cordova. I have to know if this plugin can built alone.

cordova -v
cordova create testing
cd testing
cordova plugin add cordova-plugin-sim
cordova platform add android
cordova build android
rolinger commented 8 years ago

I just upgraded cordova from 5.0.0. to 6.0.0 and ionic from 1.5.0 to 1.7.14

Then this.

C:\Users\RPO\dev\cTest>cordova build android ERROR building one of the platforms: Please install Android target: "android-23".

Hint: Open the SDK manager by running: "C:\Users\RPO\AppData\Local\Android\sdk\tools\android.bat" You will require:

  1. "SDK Platform" for android-23
  2. "Android SDK Platform-tools (latest)
  3. "Android SDK Build-tools" (latest) You may not have the required environment or OS to build this project Error: Please install Android target: "android-23".

Hint: Open the SDK manager by running: "C:\Users\RPO\AppData\Local\Android\sdk\tools\android.bat" You will require:

  1. "SDK Platform" for android-23
  2. "Android SDK Platform-tools (latest)
  3. "Android SDK Build-tools" (latest)

Now I am updating all my Android packages and installing API 23. Appears I am a bit out of date, 31 total updates and new items to install. Will post again shortly.

To get your plugin working has turned into a chain reaction of upgrades and installs. However, A) I need to do it but am fearful of what else its going to break and B) I really need the functionality of your plugin to be able to move forward with my app. Fingers crossed.

rolinger commented 8 years ago

Ugh...ok...update here.

I updated all the Android SDK packages and ran two separate test projects. One cordova ONLY and a second IONIC.

Both installs accepted the cordova-plugin-sim package. So it appears the plugin is now OK and the previous errors were based on missing or out of date SDK api 23 (and related) packages...except now that I have just updated everything I am scared to go test my main app to see how much all the updates and new installs have impacted it. Will update shortly.

rolinger commented 8 years ago

Ok...same issues are back now. With all SDK packages, ionic, cordova, etc completely up to date I compiled my main project WITHOUT cordova-plugin-sim and it worked just fine. Then I added the cordova-plugin-sim and recompiled again and then got the same errors as before. So obviously the cordova-plugin-sim is conflicting with another plugin. I am going to add all my plugin's one at a time to my test project and compile after each add to see when/what is causing it break.

In fact I am going to add each plugin to both Cordova and Ionic test projects to try and see exactly where the conflict is coming from.

:compileDebugJavaC:\Users\RPO\dev\WHIPSTER\platforms\android\src\com\pbakondy\Sim.java:134: error: cannot find symbol ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ symbol: method checkSelfPermission(Activity,String) location: class ContextCompat C:\Users\RPO\dev\WHIPSTER\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat

rolinger commented 8 years ago

Ok...found it. The conflict is with the facebook plugin. And of course, it was the last one I had to add. And I only did this on the Cordova ONLY testApp. Up until I installed the facebook plugin, the testApp compiled cleanly after every new plugin added (one at a time).

All clean:

C:\Users\RPO\dev\cTest>cordova plugin com.ludei.webview.plus 2.4.3 "Webview+" com.phonegap.plugins.nativesettingsopener 1.0 "Native settings" cordova-plugin-console 1.0.2 "Console" cordova-plugin-device 1.1.1 "Device" cordova-plugin-device-motion 1.2.0 "Device Motion" cordova-plugin-device-orientation 1.0.2 "Device Orientation" cordova-plugin-dialogs 1.2.0 "Notification" cordova-plugin-fastrde-checkgps 1.0.0 "checkGPS" cordova-plugin-geolocation 2.1.0 "Geolocation" cordova-plugin-globalization 1.0.2 "Globalization" cordova-plugin-googleplayservices 19.0.3 "Google Play Services for Android" cordova-plugin-sim 1.2.1 "SIM" cordova-plugin-splashscreen 3.2.0 "Splashscreen" cordova-plugin-statusbar 2.1.1 "StatusBar" cordova-plugin-vibration 2.1.0 "Vibration" cordova-plugin-whitelist 1.2.1 "Whitelist" cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)" cordova.plugins.diagnostic.api-22 2.3.10-api-22 "Diagnostic"

Then added FB plugin:

cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin/ --variable APP_ID="xxxxxxxxxxxxxxxxxxx" --variable APP_NAME="myApplication"

Fetching plugin "https://github.com/Wizcorp/phonegap-facebook-plugin/" via git clone Repository "https://github.com/Wizcorp/phonegap-facebook-plugin/" checked out to git ref "master". Installing "phonegap-facebook-plugin" for android

And the build:

cordova build android

C:\Users\RPO\dev\cTest>cordova build android ANDROID_HOME=C:\Users\RPO\AppData\Local\Android\sdk JAVA_HOME=C:\program files\java\jdk1.8.0_40 :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles UP-TO-DATE :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugRenderscript UP-TO-DATE :CordovaLib:generateDebugResValues UP-TO-DATE :CordovaLib:generateDebugResources UP-TO-DATE :CordovaLib:packageDebugResources UP-TO-DATE :CordovaLib:compileDebugAidl UP-TO-DATE :CordovaLib:generateDebugBuildConfig UP-TO-DATE :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets UP-TO-DATE :CordovaLib:processDebugManifest UP-TO-DATE :CordovaLib:processDebugResources UP-TO-DATE :CordovaLib:generateDebugSources UP-TO-DATE :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE :CordovaLib:bundleDebug UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preDebugBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileDebugNdk UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileLint :phonegap-facebook-plugin:FacebookLib:copyDebugLint UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeDebugProguardFiles :phonegap-facebook-plugin:FacebookLib:packageDebugRenderscript UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:checkDebugManifest :phonegap-facebook-plugin:FacebookLib:preDebugAndroidTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preDebugUnitTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:prepareAndroidCordovaLibUnspecifiedDebugLibrary :phonegap-facebook-plugin:FacebookLib:prepareDebugDependencies :phonegap-facebook-plugin:FacebookLib:compileDebugRenderscript :phonegap-facebook-plugin:FacebookLib:generateDebugResValues :phonegap-facebook-plugin:FacebookLib:generateDebugResources :phonegap-facebook-plugin:FacebookLib:packageDebugResources :phonegap-facebook-plugin:FacebookLib:compileDebugAidl :phonegap-facebook-plugin:FacebookLib:generateDebugBuildConfig :phonegap-facebook-plugin:FacebookLib:generateDebugAssets UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeDebugAssets :phonegap-facebook-plugin:FacebookLib:mergeDebugResources :phonegap-facebook-plugin:FacebookLib:processDebugManifest :phonegap-facebook-plugin:FacebookLib:processDebugResources :phonegap-facebook-plugin:FacebookLib:generateDebugSources :phonegap-facebook-plugin:FacebookLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:phonegap-facebook-plugin:FacebookLib:processDebugJavaRes UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:transformResourcesWithMergeJavaResForDebug :phonegap-facebook-plugin:FacebookLib:transformClassesAndResourcesWithSyncLibJarsForDebug :phonegap-facebook-plugin:FacebookLib:mergeDebugJniLibFolders :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithMergeJniLibsForDebug :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithSyncJniLibsForDebug :phonegap-facebook-plugin:FacebookLib:bundleDebug :prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE :prepareAndroidPhonegapFacebookPluginFacebookLibUnspecifiedDebugLibrary :preReleaseBuild UP-TO-DATE :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseRenderscript UP-TO-DATE :CordovaLib:generateReleaseResValues UP-TO-DATE :CordovaLib:generateReleaseResources UP-TO-DATE :CordovaLib:packageReleaseResources UP-TO-DATE :CordovaLib:compileReleaseAidl UP-TO-DATE :CordovaLib:generateReleaseBuildConfig UP-TO-DATE :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets UP-TO-DATE :CordovaLib:processReleaseManifest UP-TO-DATE :CordovaLib:processReleaseResources UP-TO-DATE :CordovaLib:generateReleaseSources UP-TO-DATE :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE :CordovaLib:bundleRelease UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preReleaseBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileReleaseNdk UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:copyReleaseLint UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeReleaseProguardFiles :phonegap-facebook-plugin:FacebookLib:packageReleaseRenderscript UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:checkReleaseManifest :phonegap-facebook-plugin:FacebookLib:preReleaseUnitTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:prepareAndroidCordovaLibUnspecifiedReleaseLibrary :phonegap-facebook-plugin:FacebookLib:prepareReleaseDependencies :phonegap-facebook-plugin:FacebookLib:compileReleaseRenderscript :phonegap-facebook-plugin:FacebookLib:generateReleaseResValues :phonegap-facebook-plugin:FacebookLib:generateReleaseResources :phonegap-facebook-plugin:FacebookLib:packageReleaseResources :phonegap-facebook-plugin:FacebookLib:compileReleaseAidl :phonegap-facebook-plugin:FacebookLib:generateReleaseBuildConfig :phonegap-facebook-plugin:FacebookLib:generateReleaseAssets UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeReleaseAssets :phonegap-facebook-plugin:FacebookLib:mergeReleaseResources :phonegap-facebook-plugin:FacebookLib:processReleaseManifest :phonegap-facebook-plugin:FacebookLib:processReleaseResources :phonegap-facebook-plugin:FacebookLib:generateReleaseSources :phonegap-facebook-plugin:FacebookLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:phonegap-facebook-plugin:FacebookLib:processReleaseJavaRes UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:transformResourcesWithMergeJavaResForRelease :phonegap-facebook-plugin:FacebookLib:transformClassesAndResourcesWithSyncLibJarsForRelease :phonegap-facebook-plugin:FacebookLib:mergeReleaseJniLibFolders :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithMergeJniLibsForRelease :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithSyncJniLibsForRelease :phonegap-facebook-plugin:FacebookLib:bundleRelease :prepareComAndroidSupportSupportV42400Alpha1Library UP-TO-DATE :prepareDebugDependencies :compileDebugAidl UP-TO-DATE :compileDebugRenderscript :generateDebugBuildConfig UP-TO-DATE :generateDebugAssets UP-TO-DATE :mergeDebugAssets :generateDebugResValues UP-TO-DATE :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :compileDebugJavaWithJavacC:\Users\RPO\dev\cTest\platforms\android\src\com\pbakondy\Sim.java:134: error: cannot find symbol ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)); ^ symbol: method checkSelfPermission(Activity,String) location: class ContextCompat C:\Users\RPO\dev\cTest\platforms\android\src\com\pbakondy\Sim.java:139: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, 12345); ^ symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors FAILED

FAILURE: Build failed with an exception.

Total time: 21.129 secs option to get more log output. ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\Users\RPO\dev\cTest\platforms\android\gradlew cdvBui ldDebug -b C:\Users\RPO\dev\cTest\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" You may not have the required environment or OS to build this project Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\RPO\dev\cTest\platforms\android\gradlew cdvBuildDebug -b C:\Users\RPO\dev\cT est\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

pbakondy commented 8 years ago

Could you try a test project only with sim and facebook plugin?

rolinger commented 8 years ago

C:\Users\RPO\dev>cordova create cTest1 Creating a new cordova project.

C:\Users\RPO\dev>cd cTest1

C:\Users\RPO\dev\cTest1>cordova plugin add cordova-plugin-sim Fetching plugin "cordova-plugin-sim" via npm

C:\Users\RPO\dev\cTest1>cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin/ --variable APP_ID="851844754851253" --variab le APP_NAME="myApplication" Fetching plugin "https://github.com/Wizcorp/phonegap-facebook-plugin/" via git clone Repository "https://github.com/Wizcorp/phonegap-facebook-plugin/" checked out to git ref "master".

C:\Users\RPO\dev\cTest1>cordova platform add android Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: io.cordova.hellocordova Name: HelloCordova Activity: MainActivity Android target: android-23 Android project created with cordova-android@5.1.1 Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project Fetching plugin "cordova-plugin-whitelist@1" via npm Installing "cordova-plugin-whitelist" for android

           This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you

do not need this plugin since the whitelist will be built in.

Installing "cordova-plugin-sim" for android Installing "phonegap-facebook-plugin" for android

C:\Users\RPO\dev\cTest1>cordova build android ANDROID_HOME=C:\Users\RPO\AppData\Local\Android\sdk JAVA_HOME=C:\program files\java\jdk1.8.0_40 :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:compileDebugAidl :CordovaLib:generateDebugBuildConfig :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets :CordovaLib:processDebugManifest :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :phonegap-facebook-plugin:FacebookLib:preBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preDebugBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileDebugNdk UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileLint :phonegap-facebook-plugin:FacebookLib:copyDebugLint UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeDebugProguardFiles :phonegap-facebook-plugin:FacebookLib:packageDebugRenderscript UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:checkDebugManifest :phonegap-facebook-plugin:FacebookLib:preDebugAndroidTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:preDebugUnitTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:prepareAndroidCordovaLibUnspecifiedDebugLibrary :phonegap-facebook-plugin:FacebookLib:prepareDebugDependencies :phonegap-facebook-plugin:FacebookLib:compileDebugRenderscript :phonegap-facebook-plugin:FacebookLib:generateDebugResValues :phonegap-facebook-plugin:FacebookLib:generateDebugResources :phonegap-facebook-plugin:FacebookLib:packageDebugResources :phonegap-facebook-plugin:FacebookLib:compileDebugAidl :phonegap-facebook-plugin:FacebookLib:generateDebugBuildConfig :phonegap-facebook-plugin:FacebookLib:generateDebugAssets UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeDebugAssets :phonegap-facebook-plugin:FacebookLib:mergeDebugResources :phonegap-facebook-plugin:FacebookLib:processDebugManifest :phonegap-facebook-plugin:FacebookLib:processDebugResources :phonegap-facebook-plugin:FacebookLib:generateDebugSources :phonegap-facebook-plugin:FacebookLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:phonegap-facebook-plugin:FacebookLib:processDebugJavaRes UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:transformResourcesWithMergeJavaResForDebug :phonegap-facebook-plugin:FacebookLib:transformClassesAndResourcesWithSyncLibJarsForDebug :phonegap-facebook-plugin:FacebookLib:mergeDebugJniLibFolders :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithMergeJniLibsForDebug :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithSyncJniLibsForDebug :phonegap-facebook-plugin:FacebookLib:bundleDebug :prepareAndroidCordovaLibUnspecifiedDebugLibrary :prepareAndroidPhonegapFacebookPluginFacebookLibUnspecifiedDebugLibrary :preReleaseBuild UP-TO-DATE :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:compileReleaseAidl :CordovaLib:generateReleaseBuildConfig :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets :CordovaLib:processReleaseManifest :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease :CordovaLib:mergeReleaseJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForRelease :CordovaLib:transformNative_libsWithSyncJniLibsForRelease :CordovaLib:bundleRelease :phonegap-facebook-plugin:FacebookLib:preReleaseBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:compileReleaseNdk UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:copyReleaseLint UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeReleaseProguardFiles :phonegap-facebook-plugin:FacebookLib:packageReleaseRenderscript UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:checkReleaseManifest :phonegap-facebook-plugin:FacebookLib:preReleaseUnitTestBuild UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:prepareAndroidCordovaLibUnspecifiedReleaseLibrary :phonegap-facebook-plugin:FacebookLib:prepareReleaseDependencies :phonegap-facebook-plugin:FacebookLib:compileReleaseRenderscript :phonegap-facebook-plugin:FacebookLib:generateReleaseResValues :phonegap-facebook-plugin:FacebookLib:generateReleaseResources :phonegap-facebook-plugin:FacebookLib:packageReleaseResources :phonegap-facebook-plugin:FacebookLib:compileReleaseAidl :phonegap-facebook-plugin:FacebookLib:generateReleaseBuildConfig :phonegap-facebook-plugin:FacebookLib:generateReleaseAssets UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:mergeReleaseAssets :phonegap-facebook-plugin:FacebookLib:mergeReleaseResources :phonegap-facebook-plugin:FacebookLib:processReleaseManifest :phonegap-facebook-plugin:FacebookLib:processReleaseResources :phonegap-facebook-plugin:FacebookLib:generateReleaseSources :phonegap-facebook-plugin:FacebookLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

:phonegap-facebook-plugin:FacebookLib:processReleaseJavaRes UP-TO-DATE :phonegap-facebook-plugin:FacebookLib:transformResourcesWithMergeJavaResForRelease :phonegap-facebook-plugin:FacebookLib:transformClassesAndResourcesWithSyncLibJarsForRelease :phonegap-facebook-plugin:FacebookLib:mergeReleaseJniLibFolders :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithMergeJniLibsForRelease :phonegap-facebook-plugin:FacebookLib:transformNative_libsWithSyncJniLibsForRelease :phonegap-facebook-plugin:FacebookLib:bundleRelease :prepareComAndroidSupportSupportV42400Alpha1Library :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugAssets UP-TO-DATE :mergeDebugAssets :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :compileDebugJavaWithJavac :compileDebugNdk UP-TO-DATE :compileDebugSources :transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION: FAILED com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$Accessibilit yServiceInfoVersionImpl; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334) at com.android.dx.command.dexer.Main.run(Main.java:277) at com.android.dx.command.dexer.Main.main(Main.java:245) at com.android.dx.command.Main.main(Main.java:106)

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 37.738 secs ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\Users\RPO\dev\cTest1\platforms\android\gradlew cdvBu ildDebug -b C:\Users\RPO\dev\cTest1\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" You may not have the required environment or OS to build this project Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\RPO\dev\cTest1\platforms\android\gradlew cdvBuildDebug -b C:\Users\RPO\dev\c Test1\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

pbakondy commented 8 years ago

Thanks, I will check it.

rolinger commented 8 years ago

granted, the build error is different than original error posted...but now its JUST those two plugins.

In addition, in this two plugin testApp (sim/facebook) I just removed the cordova-plugin-sim plugin and the testApp compiled cleanly.

rolinger commented 8 years ago

also note, that on my main app I had Facebook plugin 0.11.0 installed...and in my testApp I had Facebook plugin 0.12.0 installed. So cordova-plugin-sim was failing/conflicting with both versions of the FB plugin.

pbakondy commented 8 years ago

It seems phonegap-facebook-plugin has conflicts with another plugins not only with cordova-plugin-sim. I found these issues:

The reason of these issues is the phonegap-facebook-plugin does not follow the recommended build process of latest Android.

Android build uses Gradle to build the application. It loads the required dependencies from the maven repository. But phonegap-facebook-plugin includes the android-support-v4 and FacebookLib libraries directly, the plugin contains these dependencies. When an another plugin also wants to use android-support library, Gradle is not able to resolve the conflict. The application can not work with two different sdk-s.

These forks of phonegap-facebook-plugin are solving this issue. cordova-plugin-sim works with both of them:

rolinger commented 8 years ago

Interesting. I will look into them. Thank you. In the meantime, can you answer the difference between your plugin and cordova-plugin-carrier? Using the same FB plugin I have now that cordova-plugin-carrier works just fine.

pbakondy commented 8 years ago

cordova-plugin-sim is up-to-date, it delivers more information form the device. cordova-plugin-carrier is older, does not follow Android API 23 permission requirements.

rolinger commented 8 years ago

cool thanks. Will see about getting another FB plugin that you mentioned above.

pbakondy commented 8 years ago

Can we close this issue?