我正在尝试使用swf
运行WebView
文件。
但未显示。我还在电话上安装了AdobeAir
和FlashPlayer
。
webView=(WebView)findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setPluginState(WebSettings.PluginState.ON);
webView.loadUrl("http://condor.depaul.edu/sjost/hci430/flash-examples/swf/bumble-bee1.swf");
清单:
<uses-permission android:name="android.permission.INTERNET"/>
<application android:hardwareAccelerated="true"
</application>
我了解Android不支持swf
文件,也不支持Adobe。
有什么方法可以在Android上显示swf
文件?
因此,有swf
个播放器在Google Play上运行,他们是如何做到的?
答案 0 :(得分:0)
我尝试使用geckoview_library,但在实施时遇到错误。
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "28.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.example.data"
minSdkVersion 8
targetSdkVersion 18
}
flavorDimensions "abi"
productFlavors {
x86 { dimension "abi" }
x86_64 { dimension "abi" }
arm { dimension "abi" }
aarch64 { dimension "abi" }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
implementation 'com.android.support:support-v4:19.1.0'
x86Implementation "org.mozilla.geckoview:geckoview-nightly-x86:64.0.20180927100037"
x86_64Implementation "org.mozilla.geckoview:geckoview-nightly-x86_64:64.0.20180927100037"
armImplementation "org.mozilla.geckoview:geckoview-nightly-armeabi-v7a:64.0.20180927100037"
aarch64Implementation "org.mozilla.geckoview:geckoview-nightly-arm64-v8a:64.0.20180927100037"
}
渐变项目:
buildscript {
repositories {
jcenter()
google()
maven {
url "https://maven.mozilla.org/maven2/"
}
maven {
url 'https://ci.mozilla.org/job/mozilla-central-geckoview/mozilla-central_Maven_Repository'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
}
}