This was a tough one.
Quick answer: You need to pass empty objects instead of "null" for the flashVars and attributes: (See my corrected demo code here)
swfobject.embedSWF("http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test6.swf", "myContent1", "300", "120", "9.0.0", "expressInstall.swf", {}, {});
swfobject.embedSWF("http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test6.swf", "myContent2", "300", "120", "9.0.0", "expressInstall.swf", {}, params, {}, outputStatus);
Full answer: Digging into the SWFAddress source code, they are rewriting the SWFObject embed functionality so they can inject their own. One of the things they have to do to do this is transfer all of the parameters you pass in to their own function. The "null" you were passing for the attributes object was causing an error in the SWFAddress code here:
var _s2e = swfobject.embedSWF;
swfobject.embedSWF = function() {
_args = arguments;
if (typeof _args[8] == UNDEFINED)
_args[8] = {};
if (typeof _args[8].id == UNDEFINED)
_args[8].id = _args[1]; // <-- ERROR here when this parameter (attributes) is null.
_s2e.apply(this, _args);
_ref.addId(_args[8].id);
}
The error caused the whole second embed to fail.
Your compile SDK version must match the support library. so do one of the following:
1.In your Build.gradle
change
compile 'com.android.support:appcompat-v7:23.0.1'
2.Or change:
compileSdkVersion 23
buildToolsVersion "23.0.2"
to
compileSdkVersion 25
buildToolsVersion "25.0.2"
As you are using : compile 'com.android.support:appcompat-v7:25.3.1'
i would recommend to use the 2nd method as it is using the latest sdk - so you can able to utilize the new functionality of the latest sdk.
Latest Example of build.gradle with build tools 27.0.2 -- Source
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "your_applicationID"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
testCompile 'junit:junit:4.12'
}
If you face problem during updating the version like:
Go through this Answer for easy upgradation using Google Maven Repository
EDIT
if you are using Facebook Account Kit
don't use: compile 'com.facebook.android:account-kit-sdk:4.+'
instead use a specific version like:
compile 'com.facebook.android:account-kit-sdk:4.12.0'
there is a problem with the latest version in account kit with sdk 23
EDIT
For Facebook Android Sdk
in your build.gradle
instead of:
compile 'com.facebook.android:facebook-android-sdk: 4.+'
use a specific version:
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
there is a problem with the latest version in Facebook sdk with Android sdk version 23.
Best Answer
Your compile SDK version must match the support library's major version.
Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK.
Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.