Error on import FacebookSDK - facebook-android-sdk

I downloaded Facebook API 3.0 and I imported it to Eclipse (Helion). I created new project of my app (called HAN Communication) and I tried to add as library FacebookSDK. But after this I seen this error(s) :
[2013-02-03 11:28:06 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-02-03 11:28:06 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-02-03 11:28:06 - HANCommunication] All versions of the libraries must be the same at this time.
[2013-02-03 11:28:06 - HANCommunication] Versions found are:
[2013-02-03 11:28:06 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar
[2013-02-03 11:28:06 - HANCommunication] Length: 349252
[2013-02-03 11:28:06 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-02-03 11:28:06 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar
[2013-02-03 11:28:06 - HANCommunication] Length: 385685
[2013-02-03 11:28:06 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e
[2013-02-03 11:28:06 - HANCommunication] Jar mismatch! Fix your dependencies
[2013-02-03 11:29:17 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-02-03 11:29:17 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-02-03 11:29:17 - HANCommunication] All versions of the libraries must be the same at this time.
[2013-02-03 11:29:17 - HANCommunication] Versions found are:
[2013-02-03 11:29:17 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar
[2013-02-03 11:29:17 - HANCommunication] Length: 349252
[2013-02-03 11:29:17 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-02-03 11:29:17 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar
[2013-02-03 11:29:17 - HANCommunication] Length: 385685
[2013-02-03 11:29:17 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e
[2013-02-03 11:29:17 - HANCommunication] Jar mismatch! Fix your dependencies
[2013-02-03 11:34:45 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-02-03 11:34:45 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-02-03 11:34:45 - HANCommunication] All versions of the libraries must be the same at this time.
[2013-02-03 11:34:45 - HANCommunication] Versions found are:
[2013-02-03 11:34:45 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar
[2013-02-03 11:34:45 - HANCommunication] Length: 349252
[2013-02-03 11:34:45 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-02-03 11:34:45 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar
[2013-02-03 11:34:45 - HANCommunication] Length: 385685
[2013-02-03 11:34:45 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e
[2013-02-03 11:34:45 - HANCommunication] Jar mismatch! Fix your dependencies
My manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.radzik.hancommunication"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.radzik.hancommunication.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I tried to change target API version, but this isn't helpful for me.
Thanks,

Check the libs directory in your app project folder. If there is a android-support-v4.jar in there, this is the cause of the error. Facebook SDK has included a version of this jar already and apparently they don't match. I solved this problem by removing the jar from my app project.
I suspect the cause of the mismatch is that the android SDK jar has been updated since the one the SDK was developed with.

Related

ava dependencies missing from package-lock.json after upgrading it

I have just upgraded ava in one of my projects using npm install --save-dev ava#0.22.0.
To my surprise, all its dependencies are now missing from package-lock.json:
Added:
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/ava/-/ava-0.22.0.tgz",
+ "integrity": "sha512-dYxvVDL9CeIcgaQ/FojaBVaL/rnIsXdgPVliDOMe1O5nSsIZEsPYDIzmZ1KnO/cuxeQx1PQbtW6qziiEwQZusg==",
+ "dev": true
Removed:
- "requires": {
- "#ava/babel-preset-stage-4": "1.1.0",
- "#ava/babel-preset-transform-test-files": "3.0.0",
- "#ava/write-file-atomic": "2.2.0",
- "#concordance/react": "1.0.0",
- "ansi-escapes": "2.0.0",
- "ansi-styles": "3.2.0",
- "arr-flatten": "1.1.0",
- "array-union": "1.0.2",
- "array-uniq": "1.0.3",
...
Other than that, my code and tests run as expected.
Why were all the dependencies removed from the package-lock.json file?
Make sure you're consistently using the same version of npm across your team. The latest (5.4.2 at time of writing) has many fixes related to the package-lock.json file, compared to earlier releases.

Class yii\debug\Module does not exist after Update Composer

after Update Composer i have error Class yii\debug\Module does not exist
before run Update Composer my Gii , Debuger in Yii2 is Worked without any Problem.
my Composer.json in Root Yii2 Directory:
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.5",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"yiisoft/yii2-jui": "^2.0"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1",
"codeception/specify": "~0.4.3"
},
"config": {
"process-timeout": 1800
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
Result:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 8 updates, 53 removals
- Removing bower-asset/typeahead.js (v0.11.1)
- Removing bower-asset/jquery-ui (1.11.4)
- Removing mrlco/yii2-jalali-datepicker (0.1.0)
- Removing bower-asset/persian-datepicker (0.4.5)
- Removing bower-asset/persian-date (0.1.8-patch1)
- Removing codeception/specify (0.4.6)
- Removing codeception/verify (0.3.2)
- Removing codeception/base (2.2.8)
- Removing phpunit/phpunit (5.7.9)
- Removing myclabs/deep-copy (1.6.0)
- Removing phpspec/prophecy (v1.6.2)
- Removing phpdocumentor/reflection-docblock (3.1.1)
- Removing phpdocumentor/type-resolver (0.2.1)
- Removing phpdocumentor/reflection-common (1.0)
- Removing webmozart/assert (1.2.0)
- Removing phpunit/php-timer (1.0.8)
- Removing phpunit/phpunit-mock-objects (3.4.3)
- Removing doctrine/instantiator (1.0.5)
- Removing sebastian/global-state (1.1.1)
- Removing sebastian/object-enumerator (2.0.0)
- Removing sebastian/resource-operations (1.0.0)
- Removing phpunit/php-code-coverage (4.0.5)
- Removing phpunit/php-file-iterator (1.4.2)
- Removing phpunit/php-text-template (1.2.1)
- Removing phpunit/php-token-stream (1.4.9)
- Removing sebastian/code-unit-reverse-lookup (1.0.0)
- Removing sebastian/environment (2.0.0)
- Removing sebastian/version (2.0.1)
- Removing guzzlehttp/psr7 (1.3.1)
- Removing psr/http-message (1.0.1)
- Removing symfony/finder (v3.2.2)
- Removing symfony/console (v3.2.2)
- Removing symfony/debug (v3.2.2)
- Removing psr/log (1.0.2)
- Removing symfony/event-dispatcher (v3.2.2)
- Removing symfony/yaml (v3.2.2)
- Removing symfony/browser-kit (v3.2.2)
- Removing symfony/css-selector (v3.2.2)
- Removing symfony/dom-crawler (v3.2.2)
- Removing symfony/polyfill-mbstring (v1.3.0)
- Removing behat/gherkin (v4.4.5)
- Removing sebastian/comparator (1.2.4)
- Removing sebastian/exporter (2.0.0)
- Removing sebastian/recursion-context (2.0.0)
- Removing sebastian/diff (1.4.1)
- Removing yiisoft/yii2-faker (2.0.3)
- Removing fzaninotto/faker (v1.6.0)
- Removing yiisoft/yii2-gii (2.0.5)
- Removing phpspec/php-diff (v1.1.0)
- Removing yiisoft/yii2-debug (2.0.7)
- Removing yiisoft/yii2-jui (2.0.6)
- Removing yiisoft/yii2-swiftmailer (2.0.6)
- Removing swiftmailer/swiftmailer (v5.4.5)
- Updating symfony/inflector (v3.2.8 => v3.3.0): Downloading (100%)
- Updating symfony/property-access (v3.2.8 => v3.3.0): Downloading (100%)
- Updating symfony/options-resolver (v3.2.8 => v3.3.0): Downloading (100%)
- Updating endroid/qrcode (2.1.4 => 2.2.2): Downloading (100%)
- Updating ezyang/htmlpurifier (v4.8.0 => v4.9.2): Downloading (100%)
- Updating bower-asset/jquery.inputmask (3.3.5 => 3.3.6): Downloading (100%)
- Updating yiisoft/yii2 (2.0.11 => 2.0.11.2): Downloading (100%)
- Updating 2amigos/yii2-ckeditor-widget (2.0.1 => 2.0.1): Loading from cache
Writing lock file
Generating autoload files

How to add moq as a dependency in dotnet Core?

I have the following dependencies in my dotnet core application:
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"Moq": "4.0.10827"
},
And no matter what version i download of Moq its simply just not supported, it says:
Package Moq 4.0.10827 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Moq 4.0.10827 supports:
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
- sl4 (Silverlight,Version=v4.0)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
But i read on this blogpost: Moq on .NET Core that it was possible, i have the nuget plugin in studio code, so it autocompletes packages, i just cannot find any package when i write moq.netcore Maybe i am asking more of an approach to finding out if such a plugin actually exists, more than an answer, because right now i can't see on nuget if packages are supported in dotnet Core, how do you guys check if it has support? and do you only look for packages on Nuget.org ?
Thanks
EDIT: Solution project.json:
{
"version": "1.0.0-*",
"testRunner": "xunit",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"moq": "4.6.38-alpha"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
}
I guess current stable version in Nuget is 4.5.23 and in your code you have mentioned it should be 4.0.10827, may be that is causing problem.
As shown in your error, Moq 4.0.10827 is not compatible with netcoreapp1.0 and it only supports till 4.0, Look here for more details on versions of Moq
I have also wrote blog on Moq in .Net core, which is here. But I make changes in this everyday due to new changes.
Edit: As per DenLilleMand:
4.6.38-alpha works - but e.g. 4.5.3 doesn't work, that complains that Moq 4.5.3 supports net45 and one or more packages are incompatible
with .NETCoreApp V1.0.

xunit on dotnet cli project

I am trying to set up xunit tests on a dotnet cli project. I realize this is very early stages of support. Right now, I am not able to restore packages. Below is my project.json
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002392"
},
"xunit": "2.1.0-*",
"dotnet-test-xunit": "1.0.0-dev-*"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50"
]
}
},
"testRunner": "dotnet-test-xunit"
}
After running dotnet restore I get the following errors:
Package xunit.assert 2.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package xunit.assert 2.1.0 supports:
- dotnet (.NETPlatform,Version=v5.0)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
Package xunit.runner.reporters 2.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package xunit.runner.reporters 2.1.0 supports:
- dnx451 (DNX,Version=v4.5.1)
- dotnet (.NETPlatform,Version=v5.0)
- net45 (.NETFramework,Version=v4.5)
Package Microsoft.Extensions.Logging.Abstractions 1.0.0-rc2-16040 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.Extensions.Logging.Abstractions 1.0.0-rc2-16040 supports:
- dotnet5.4 (.NETPlatform,Version=v5.4)
- net451 (.NETFramework,Version=v4.5.1)
- netcore50 (.NETCore,Version=v5.0)
Package Microsoft.DiaSymReader 1.0.6 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DiaSymReader 1.0.6 supports:
- net20 (.NETFramework,Version=v2.0)
- portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
Package Microsoft.Extensions.FileSystemGlobbing 1.0.0-rc2-15996 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.Extensions.FileSystemGlobbing 1.0.0-rc2-15996 supports:
- dotnet5.4 (.NETPlatform,Version=v5.4)
- net451 (.NETFramework,Version=v4.5.1)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
Feeds used:
https://www.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
https://www.myget.org/F/coreclr-xunit/api/v2
https://www.myget.org/F/dotnet-cli/
The imports that you specify cannot satisfy all the requirements. That's why you see the errors.
Try replacing them with:
"imports": [
"portable-net451+win8",
"dnxcore50"
]
Also, the xunit runner should be "xunit" not "dotnet-test-xunit".
See an example project here: https://github.com/aspnet/dotnet-watch/blob/46d4c6edcb374060b4e8ebf83e3ccd399f8f61ae/test/dotnet-watch.FunctionalTests/project.json

IntelliJ, Unable to edit JSP files

I'm using IntelliJ 12.0.4 Community Edition.
My problem is that I can only Open the JSP Files and just type something in them. Backspace, DELETE and other editing Keys don't work and the whole IDE hangs somehow and I must restart the IntelliJ.
the Logfiles contain dosen of such entry:
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - IntelliJ IDEA 12.0.4 Build #IC-123.169
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - JDK: 1.7.0_09
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - VM: Java HotSpot(TM) Client VM
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - Vendor: Oracle Corporation
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - OS: Windows 7
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - Last Action: EditorEnter
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - View provider com.intellij.psi.SingleRootFileViewProvider#1558433 refused to parse text with Language: TEXT; base: Language: ANY; copy: Language: ANY; fileType: com.intellij.openapi.fileTypes.impl.AbstractFileType#1573ede
java.lang.RuntimeException: View provider com.intellij.psi.SingleRootFileViewProvider#1558433 refused to parse text with Language: TEXT; base: Language: ANY; copy: Language: ANY; fileType: com.intellij.openapi.fileTypes.impl.AbstractFileType#1573ede
at com.intellij.psi.impl.source.text.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:193)
at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRangeInternal(BlockSupportImpl.java:143)
at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:82)
at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:578)
at com.intellij.psi.impl.DocumentCommitThread.access$600(DocumentCommitThread.java:67)
at com.intellij.psi.impl.DocumentCommitThread$3.run(DocumentCommitThread.java:460)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1155)
at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:473)
at com.intellij.psi.impl.DocumentCommitThread.access$500(DocumentCommitThread.java:67)
at com.intellij.psi.impl.DocumentCommitThread$2.run(DocumentCommitThread.java:352)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:232)
at com.intellij.psi.impl.DocumentCommitThread.pollQueue(DocumentCommitThread.java:349)
at com.intellij.psi.impl.DocumentCommitThread.run(DocumentCommitThread.java:293)
at java.lang.Thread.run(Thread.java:722)
has somebody the same Problem?
I sometimes have the same problem. Minimizing and reopening easily done by pressing ALT + TAB ALT + TAB (you have to lift the ALT key too) solves this problem.