I had implemented Exoplayer in my project and it was working perfectly but today it started producing error in my XML layout for the field app:player_layout_id="#layout/exo_simple_player_view", saying that can't resolve #layout/exo_simple_player_view
After some researches, I understood that it has changed from exo_simple_player_view.xml to exo_styled_player_view.xmlin Exoplayer version 2.13.2 . After I set this new style value, my error gone
You can check this Exoplayer github
Related
Yesterday, I downloaded a Project which was in eclipse and i imported it in my android studio may be due to this or some other reason today when i opened my android studio recent projects it was showing error in gradle file with some other language i searched for the error which was "File was Loaded in Wrong Encoding UTF-8 " and got a method to change from file
Please help me out what should i do i tried searching every where but could not get a fine result which worked for me.
Here is my sample code of .xml file which is don't know in which format and why
���� 3
0abc_background_cache_hint_selector_material_dark I
ConstantValue 1abc_background_cache_hint_selector_material_light (abc_btn_colored_borderless_text_material abc_btn_colored_text_material abc_color_highlight_material !abc_hint_foreground_material_dark "abc_hint_foreground_material_light !abc_input_method_navigation_guard +abc_primary_text_disable_only_material_dark ,abc_primary_text_disable_only_material_light abc_primary_text_material_dark
abc_primary_text_material_light abc_search_url_text abc_search_url_text_normal
abc_search_url_text_pressed abc_search_url_text_selected abc_secondary_text_material_dark !abc_secondary_text_material_light abc_tint_btn_checkable abc_tint_default abc_tint_edittext abc_tint_seek_thumb abc_tint_spinner abc_tint_switch_track accent_material_dark accent_material_light !background_floating_material_dark "background_floating_material_light background_material_dark background_material_light (bright_foreground_disabled_material_dark )bright_foreground_disabled_material_light 'bright_foreground_inverse_material_dark (bright_foreground_inverse_material_light ! bright_foreground_material_dark " bright_foreground_material_light # button_material_dark $ button_material_light % cardview_dark_background & cardview_light_background ' cardview_shadow_end_color ( cardview_shadow_start_color ) colorAccent * colorPrimary + colorPrimaryDark , %design_bottom_navigation_shadow_color - design_default_color_primary . !design_default_color_primary_dark / design_error 0 design_fab_shadow_end_color 1 design_fab_shadow_mid_color 2 design_fab_shadow_start_color 3 !design_fab_stroke_end_inner_color 4 !design_fab_stroke_end_outer_color 5 !design_fab_stroke_top_inner_color 6 !design_fab_stroke_top_outer_color 7
It was a Fine Working Projects and every thing was working but dnt know what happned tried to reset that was also not working
Searched Alot Tried to make Sdk Locations Update Updated Gradle due to which all my class files were back to normal form but this Xml File was Not re-formatted So At last i created a new Xml File.
But After Some search i come to a result that it might me due to Unwanted Closer of my Android Studio Or may be my battery drained due to which my Android Studio doesn't Closed Properly.
If Any One Know After Every update i can do one more thing so that i can re-arranged my xml file to original format I will Update My Answer if that Worked For me
Thank You.
I'm trying to create a simple paint app using the Android Paint module.
When running my app, it gives me an error in "Run", saying that there's a problem at line 14, which is the line which by default is created in my mainActivity:
setContentView(R.layout.activity_main);
None of it is underlined in my code, I can't find any errors at all in my code (including in my activity_main.xml!).
MainActivity.java: https://pastebin.com/zhEbBYdQ
activity_main.xml:https://pastebin.com/jPsA0gMX
CanvasView.java: https://pastebin.com/GctVDz5B
Any ideas? I've tried clean + rebuild, I've tried com.example.R etc.
Full error log: https://pastebin.com/26TebLhy
Thanks in advance. (New to StackOverflow - I have problems putting in code directly to these posts so I hope PasteBin is okay).
CanvasView is in the package evansspeak.paint1, in main_activity however you are trying to inflate it from *com*.evanspeak.Paint1. Fix either one to be the same.
Check that the case matches as well (preferably all lower case)
I am getting a new problem which may be due to version changes, but I don't know. The exception raised during rendering is as follows:
java.lang.System.array copy([CI[CII)V
Exception details are logged in Window > Show View > Error Log .
The following classes could not be found: - Edit Text (Change to
android.widget.Edit Text, Fix Build Path, Edit XML)
its not getting the class of edit text. From where would I get/add it?
From https://stackoverflow.com/a/24502370/826670. it looks like you are using android Wear to render it, change android version in rendered.
Check the "Android version to use when rendering layouts" and make
sure you're not using a version that ends in "W" for Android Wear
(e.g. API 20: Android 4.4W). I don't believe Wear supports
EditText.
In both Android Studio and Eclipse, it's the dropdown with the green
android in the layout preview's toolbar. You may want to set it
explicitly and not allow the IDE to choose the Android version
automatically.
Since yesterday I'm trying to install RevMob's SDK and I'm getting constant error with this line:
RevMob revmob = RevMob.start(this, REVMOB_APP_ID);
revmob.showFullscreen(this);
And the error is:
REVMOB_APP_ID cannot be resolved to a variable
I don't understand where the problem is because I have set the app id and copy pasted all the xml code that they provided still no luck. I'm literally pulling my hair out right now, its very frustrating.
Any help?
use your revmob app id..... For example: 49830398bbfid392
It has to be in wrapped with "" like this: "49830398bbfid392"
I am trying to add the Pinit button to my Android App. I have downloaded the SDK and copied the pinit-sdk-1.0.Jar into my Project/libs folder. I'm even able to make the necessary PinItButton import to my code. But for whatever reason, my XML isn't finding the Button widget, and so I tried to add it just using Java with this code:
LinearLayout ll = (LinearLayout)findViewById(R.id.pinterest_layout);
PinItButton pinit = new PinItButton(this);
ll.addView(pinit);
I know this is the correct way to add something using code because I tested it by adding a generic Button first. I run my project then, and it crashes on the line where I set up the PinItButton. This is the error that my logcat spat back at me:
07-22 01:19:52.160: E/AndroidRuntime(32367): java.lang.NoClassDefFoundError: com.pinterest.pinit.PinItButton
I believe that I'm understand what it is telling me, but what else should I be attempting then to create the PinIt button? Any help would be great. Thank you!
It was #Kai who helped me figure out my problem. I needed to check my libraries. I did that by going to project --> Properties --> Java Build Path --> Order and Export tab, then checking the library and clicking OK. My problem was then solved!