I have updated exoplayer and the exoplayer-extension-ima version from 2.11.1 to the latest one (2.18.2).
Checking the release notes I just saw this on the version 2.18.1 section:
This release corresponds to the AndroidX media3 1.0.0-beta02 release.
So I thought I had to upgrade my exoplayer imports from com.google.android.exoplayer2 to androidx.media3 and I followed this migration guide downloading the script for the 2.18.2 version and changing the LEGACY_PEER_VERSION variable from 2.18.1 to 2.18.2 and executing it withot getting any relevant error.
However after running the assembleRelease gradle script I'm facing the next errors:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'extension-level'. One of '{layoutlib}' is expected.
cvc-complex-type.2.4.d: Invalid content was found starting with element 'extension-level'. No child element is expected at this point.
cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{codename, tag}' is expected.
:myproject.exoplayer:compileReleaseJavaWithJavac
ExoPlayerListener.java
package com.google.android.exoplayer2.ext.ima does not exist
cannot find symbol class TrackGroupArray
package com.google.android.exoplayer2.trackselection does not exist
cannot find symbol class DefaultEventListener
cannot find symbol class ImaAdsLoader
cannot find symbol class ImaAdsLoader
cannot find symbol class TrackGroupArray
cannot find symbol class TrackSelectionArray
cannot find symbol class ImaAdsLoader
method does not override or implement a method from a supertype
method does not override or implement a method from a supertype
method does not override or implement a method from a supertype
method does not override or implement a method from a supertype
cannot find symbol variable super
On my ExoplayerListener.java some exoplayer imports changed (placing the mouse over them displays a Cannot resolve symbol 'media3' error)
import androidx.media3.common.Player;
import androidx.media3.common.TrackGroupArray;
And some don't (placing the mouse over them displays a Cannot resolve symbol 'android' error)
import com.google.android.exoplayer2.ext.ima.ImaAdsLoader;
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
Am I doing something wrong, or is it perhaps that my steps towards the migration aren't correct?
Mention that I haven't changed anything on the code, just changing the below imports on the build.gradle file from:
api 'com.google.android.exoplayer:exoplayer:2.11.1'
api 'com.google.android.exoplayer:extension-ima:2.11.1'
to:
api 'com.google.android.exoplayer:exoplayer:2.18.2'
api 'com.google.android.exoplayer:extension-ima:2.18.2'
And after the migration script changed to:
api 'androidx.media3:media3-exoplayer:1.0.0-beta03'
api 'androidx.media3:media3-exoplayer-ima:1.0.0-beta03'
Related
Can't resolve symbol 'of' << Image
Does anyone know why Android Studio is giving me the error 'error: cannot find symbol class 'of'?
I'm trying to use the 'ModelViewProviders.of(Fragment fragment)'
You should use ViewModelProviders.of(Fragment f). Please check.
ViewModelProviders.of() is a static method, therefore you should remove the new keyword:
mWordViewModel = ViewModelProviders.of(this).get(WordViewModel.class)
Note that as per the ViewModelProviders documentation, this class is deprecated and if you're using the latest version of Fragments, you'd instead use new ViewModelProvider(this).get(WordViewModel.class)
The error message: Could not set unknown property 'enforceUniquePackageName' for object of type com.android.build.gradle.AppExtension.
The only relevant search result I found was Gradle - "enforceUniquePackageName" deprecated with version 3.0.0+?
which notes that older Gradle versions will work with this.
I'd like to know how others have got around this issue.
I've added react-native-fbsdk to my react native project and have it building fine on iOS. But on the android side, I can't get gradle to build the project. When trying to compile react-native-fbsdk, I'm hitting: "method does not override or implement a method from a supertype"
21:41:11.863 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
21:41:12.100 [ERROR] [system.err] /Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java:61: error: method does not override or implement a method from a supertype
Which points to the following code snippet within react-native-fbsdk:
#Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
When I delete #Override, this particular instance of the error goes away, but I hit the same error in another module such as react-native-image-picker:
:react-native-image-picker:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerPackage.java:34: error: method does not override or implement a method from a supertype
#Override
^
1 error
I suspect this to be an issue with my local setup. Any ideas on what could be wrong here?
The error is very vague (and imo a bit of a mess up in the react native release flow).
React-native 0.47.0 had a breaking change that meant libs had to patch their code.
Remove unused createJSModules calls (ce6fb33, 53d5504) - source
My guess is that you just have to update the libraries for which this error shows up, and otherwise submit a PR.
Here's an example of a lib fixing it: https://github.com/rebeccahughes/react-native-device-info/pull/191/files
Update:
The PR you're waiting for is here: https://github.com/facebook/react-native-fbsdk/pull/354
The ContentResolver class has a hidden method called getSyncStatus(...).
To make it public visible I try to add a wrapper method in ContentResolverCompat from support v4 lib.
This works so far in Eclipse but when I call make it fails with the following errors:
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/SyncStatusInfo.java:91: android.content.SyncStatusInfo cannot be resolved to a type
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/ContentResolverCompat.java:19: The import android.accounts cannot be resolved
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/ContentResolverCompat.java:137: Account cannot be resolved to a type
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/ContentResolverCompat.java:138: android.content.SyncStatusInfo cannot be resolved to a type
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/ContentResolverCompat.java:146: Account cannot be resolved to a type
ERROR: /development/android/frameworks/support/v4/java/android/support/v4/content/ContentResolverCompat.java:148: android.content.SyncStatusInfo cannot be resolved to a type
My thought was that #hide is a documentation thing only and I can access it from within AOSP classes. But why I can't build my changes when I want to access hidden classes / methods?
Note: I don't want to build an Android app, I want to change / build the Android source code itself.
Edit: This isn't a duplicate of #hide class not found because #hide means that it is removed from JavaDoc but it is still accessible from Android source code itself.
I can't build my android project, it says that com.google.android.maps does not exist. It is way strange because in my project in libraries I have them. I rebuild the build.xml. The import com.google.android.maps.MapActivity; is not marked as error. What should I do?
Handling Resources...
Generating resource IDs...
C:\android-sdk-windows\tools\ant\build.xml:600: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 13 source files to C:\Users\iie\Documents\NetBeansProjects\AndroidApplication3\bin\classes
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:10: error: package com.google.android.maps does not exist
import com.google.android.maps.MapActivity;
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:16: error: cannot find symbol
public class MapMapa extends MapActivity {
symbol: class MapActivity
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:21: error: cannot find symbol
super.onCreate(icicle);
symbol: variable super
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:23: error: cannot find symbol
setContentView(R.layout.map);
symbol: method setContentView(int)
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:19: error: method does not override or implement a method from a supertype
#Override
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:26: error: method does not override or implement a method from a supertype
#Override
6 errors
C:\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
C:\android-sdk-windows\tools\ant\build.xml:600: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Make sure you
install the Google APIs in your Android SDK (this means the "Google APIs" choice instead of the "Android X.x" one)
specify to use this library in your manifest XML:
<uses-library android:name="com.google.android.maps" />
choose "Google API" as your "Build Target", not the "Android X.x" one.
FYI, when testing with the emulator AVD, you need to launch the "Google APIs" version instead of the "Android X.x" one.
ok, finally I managed to sort it out:
here is a link with everything:
http://code.davidjanes.com/blog/2009/11/13/18-hours-of-jar-hell-with-android-google-maps/
sorry for answering my own question