Using external SDK: error: package com.xxxx does not exist

Hi!

I’m trying to create a Brightcove Player using it’s SDK. I’m working on the Android part first. I’m following the S3 sample. I’ve setup the .stuff file and it correctly download the SDK. ANd this is how the .uxl file looks like

<Extensions Backend="CPlusPlus">
	<Type Name="BrightCove.Android.BCExoPlayerNative" Condition="Android">
		<CopyFile Name="bc-android-native-player-public-5.2.0/android-native-player-public-5.2.0/sdk/android-sdk-5.2.0.aar"
			TargetName="@(Java.LibsDirectory)/android-sdk-5.2.0.aar" />
		<CopyFile Name="bc-android-native-player-public-5.2.0/android-native-player-public-5.2.0/appcompat/android-appcompat-plugin-5.2.0.aar"
			TargetName="@(Java.LibsDirectory)/android-appcompat-plugin-5.2.0.aar" />
		<CopyFile Name="bc-android-native-player-public-5.2.0/android-native-player-public-5.2.0/exoplayer/android-exoplayer-player-5.2.0.aar"
			TargetName="@(Java.LibsDirectory)/android-exoplayer-player-5.2.0.aar" />
		<CopyFile Name="bc-android-native-player-public-5.2.0/android-native-player-public-5.2.0/ima/android-ima-plugin-5.2.0.aar"
			TargetName="@(Java.LibsDirectory)/android-ima-plugin-5.2.0.aar" />
	</Type>
</Extensions>

On the UNO/Android implementation i’m including these classes

	[Require("Gradle.Dependency","compile('com.google.android.gms:play-services-ads:11.0.4+')")]
	[Require("Gradle.Dependency","compile('com.google.ads.interactivemedia.v3:interactivemedia:3.6.0+')")]
	[Require("Gradle.Repository","mavenCentral()")]
    [ForeignInclude(Language.Java,
                    "com.brightcove.ima.GoogleIMAComponent",
                    "com.brightcove.ima.GoogleIMAEventType",
					"com.brightcove.player.edge.Catalog",
					"com.brightcove.player.edge.VideoListener",
					"com.brightcove.player.event.Event",
					"com.brightcove.player.event.EventEmitter",
					"com.brightcove.player.event.EventListener",
					"com.brightcove.player.event.EventType",
					"com.brightcove.player.media.VideoFields",
					"com.brightcove.player.mediacontroller.BrightcoveMediaController",
					"com.brightcove.player.mediacontroller.BrightcoveSeekBar",
					"com.brightcove.player.model.Video",
					"com.brightcove.player.view.BaseVideoView",
					"com.brightcove.player.util.StringUtil",
					"com.brightcove.player.view.BrightcoveExoPlayerVideoView",
					"com.brightcove.player.view.BrightcovePlayer",
					"com.google.ads.interactivemedia.v3.api.AdDisplayContainer",
					"com.google.ads.interactivemedia.v3.api.AdsManager",
					"com.google.ads.interactivemedia.v3.api.AdsRequest",
					"com.google.ads.interactivemedia.v3.api.ImaSdkFactory")]

When i tried to compile i get this error:

/Users/Admin/Projects/Fuse/BrightCove/BrightCove-Test-App/build/Android/Debug/app/src/main/java/com/foreign/BrightCove/Android/BCExoPlayerNative.java:35: error: package com.brightcove.player.view does not exist
import com.brightcove.player.view.BrightcovePlayer;

I’ve checked on the folder /Users/Admin/Projects/Fuse/BrightCove/BrightCove-Test-App/build/Android/Debug/app/src/main/libs
and it seems that the uxl copied the .aar files to the lib folder as expected.

Could be the problem that the Brightcove SDK uses .aar files instead the .jar files? Should i take other thing into consideration for these files? Or its just not the way to import the classes on the .uno file the problem?

Thanks in advance.

John

Hello John

Are you able to provide us with a complete reproducable testcase of this? You can send it to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK

Hi Liam! Thanks for your answer. I just send the project i’m working on.

Thanks

John

From what i can see(clicky), it seems that the common practice for using local aar’s is to include them using gradle. You can do this in Fuse.

Try [Require("Gradle.Repository", "flatDir { dirs 'aar-folder'}")], and then using Gradle.Dependency. You can read more about it Here.

Thanks! I’ll check this soon. I’ll keep you updated.

Hi John,

Did you get this working? I’m also in need of a stable video player for android users which plays HTTP Live Streaming (HLS). The default video tag works fine for iOS users.

Hi!

Not yet. I was working on other parts of the app. I;ll be ion this on february. But Brightcove player only works with the Brightcove platform, so i don’t think it will be the solution you are looking for.

Jonatan