Преглед на файлове

add a android keystore and password is 123456

Caijinglong преди 6 години
родител
ревизия
df78537621

+ 6 - 1
android/src/main/java/top/kikt/ijkplayer/NotifyChannel.kt

@@ -13,6 +13,7 @@ class NotifyChannel(val registry: PluginRegistry.Registrar, val textureId: Long,
             registry.messenger(),
             "top.kikt/ijkplayer/event/$textureId"
     )
+//    private val channel = Temp()
 
     private val info
         get() = ijk.getInfo().toMap()
@@ -42,7 +43,7 @@ class NotifyChannel(val registry: PluginRegistry.Registrar, val textureId: Long,
             logi("onInfoListener $what, extra = $extra, isPlaying = ${player.isPlaying} ")
             when (what) {
                 IMediaPlayer.MEDIA_INFO_AUDIO_DECODED_START, IMediaPlayer.MEDIA_INFO_VIDEO_DECODED_START -> {
-                    channel.invokeMethod("playStateChange", info)
+//                    channel.invokeMethod("playStateChange", info)
                 }
                 IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED -> {
                     ijk.degree = extra
@@ -66,4 +67,8 @@ class NotifyChannel(val registry: PluginRegistry.Registrar, val textureId: Long,
         player.resetListeners()
     }
 
+}
+
+class Temp {
+    fun invokeMethod(str: String, any: Any?) {}
 }

+ 13 - 15
example/android/app/build.gradle

@@ -25,12 +25,18 @@ apply plugin: 'com.android.application'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
+    signingConfigs {
+        config1 {
+            keyAlias 'run'
+            keyPassword '123456'
+            storeFile file("${project.rootDir}/example-key.jks")
+            storePassword '123456'
+        }
+    }
     compileSdkVersion 28
-
     lintOptions {
         disable 'InvalidPackage'
     }
-
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "com.example.ijkplayer_example"
@@ -40,23 +46,15 @@ android {
         versionName flutterVersionName
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
-        ndk {
-//            abiFilters "armeabi-v7a"
-            abiFilters "armeabi-v7a", "arm64-v8a"
-        }
     }
-
     buildTypes {
         release {
             // TODO: Add your own signing config for the release build.
             // Signing with the debug keys for now, so `flutter run --release` works.
-            signingConfig signingConfigs.debug
+            signingConfig signingConfigs.config1
         }
         debug {
-            ndk {
-//                abiFilters "armeabi-v7a", "x86"
-                abiFilters "armeabi-v7a", "x86", "arm64-v8a"
-            }
+            signingConfig signingConfigs.config1
         }
     }
 }
@@ -66,7 +64,7 @@ flutter {
 }
 
 dependencies {
-//    testImplementation 'junit:junit:4.12'
-//    androidTestImplementation 'com.android.support.test:runner:1.0.2'
-//    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+    //    testImplementation 'junit:junit:4.12'
+    //    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    //    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
 }

BIN
example/android/example-key.jks


+ 1 - 1
example/android/gradle.properties

@@ -1,4 +1,4 @@
 org.gradle.jvmargs=-Xmx1536M
-target-platform=android-arm
+#target-platform=android-arm
 android.enableJetifier=true
 android.useAndroidX=true