Android Studio 3.1.3: Error message 'Cannot find symbol: View' - Android Studio

I'm new to Android development and I just started playing with Android Studio 3.1.3. I'm following a tutorial from android.developer.com and I'm on the part: Start Another Activity - Respond to the Send button. Thing is, when I add the sendMessage() method stub, I get an error message saying the symbol View cannot be found. I tried the following steps to resolve the issue but I'm not successful:
- Place the cursor on View then click ALT-ENTER but the menu Import class doesn't appear.
- I clicked File - Invalidate Caches/Restart
Any useful assistance is welcome.
Christopher

Related

[Q] [HELP] sqlite and BackgroundTask

Hi,
I'm trying to implement a backgroundTask in an Universal Windows App (Windows phone runtime 8.1) and I need to do a consult in the database of the App in order to connect to my webservice on the cloud. The foreground of App uses sqlite-net nuget package without problems. But when I add it on the Windows runtime class (backgroungTask) generate 24 errors on the class Sqlite.cs. I have searched more information About this, and I have found other package that is better (because It is compatible with xamarin) that is called: sqlite.Net PCL 3.0.5 So I have installed it in my backgroundTask Project and I get an error that is the following:
Code:
Error 6 Windows Runtime type 'Windows.Foundation.Point' was found in multiple referenced winmd files. Please remove either 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral\platform.winmd' or 'C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' from the list of referenced files.
I don't know what I can do with this error. Could you help me to use sqlite in my background task?
Thank you!!
Hi again,
I have got to solve the error that I have comment because the sqlite.net pcl doesn't need vclibs12 so I delete this and then I get 24 errors. All are of one kind error, DateTime. It returns the next message:
Code:
Error 9 Method 'Tarea.UnixToDateTime(System.Int64)' returns 'System.DateTime', which is not a valid Windows Runtime type. Methods exposed to Windows Runtime must return only Windows Runtime types.
Then, the information that I have on this format, how could I get them? Or Have I change all code and the database with other type?
Thank you again!
A DateTime is just a 64-bit number underneath, with a little metadata about time zones and such. You should be able to either create a C++/CX struct for it, or just pass the int64_t and re-build the datetime on the other side.
GoodDayToDie said:
A DateTime is just a 64-bit number underneath, with a little metadata about time zones and such. You should be able to either create a C++/CX struct for it, or just pass the int64_t and re-build the datetime on the other side.
Click to expand...
Click to collapse
Hi goodDaytoDie!
Thank you by your ideas, I have changed the type of data of the Database to int64 and I have calculated the date with DateTimeOffset (this works on backgroundTask). In addition, I didn't know this type of data, but I like it because it allows get the date on different time zones without making nothing.
Thanks!!:good:

Errors in the following switches ... vmoptions

Someone who's reading one of my Android books is getting the following error message when he double-clicks the studio64.exe file:
Java installation not completed, unable to install Java , errors in the following switches c/progfiles/android/android studio/bin/studio64.exe.vmoptions check commands are valid and try again
Any suggestions?
try to set java home variable. define that to your computer where you installed java
Set?*JAVA_HOME:
Right click My Computer and select Properties.
On the Advanced tab, select Environment Variables, and then edit?*JAVA_HOME?*to point to where the JDK software is located, for example,?*C:\Program Files\Java\jdk1.6.0_02.

Plugin 'org.jetbrains.android' failed to initialize and will be disabled. Restart AS

I left my computer to sleep with Android Studio open and this suddenly happens to me now.
Plugin 'org.jetbrains.android' failed to initialize and will be disabled. Please restart Android Studio
I get this error when Android Studio starts and it forces me to restart it. Also, when it does restart, I have a bunch of errors of other plugins telling me that the plugin “Android Support” is disabled. I tried the solution of some StackOverflow answers (which this forum doesn't allow me to post yet) with no avail.
Now, in the menu, under tools, I don't even have the AVD Manager nor the SDK Manager anymore!!!
I am at my workplace getting crazy with this. Please help!!
Thank you

Error on Creating a navigation drawer

Hello. I am trying to Create a navigation drawer from a tutorial , but I have an error. When I type "return super.onOptionsItemSelected(item);" I get an error on "onOptionsItemSelected", it says 'cannot resolve method 'onOptionsItemSelected(android.view.MenuItem)'.
reply:
it is really very much interesting

Generate Signed Bundle or APK - Create New Keystore - Picked up _JAVA_OPTIONS:- Xverify:none

I have written an Android app in Kotlin, using Android Studio. I'm trying to generate a signed Bundle/APK in Android Studio in MacOS, selecting the 'Android App Bundle' option in the first window that appears. I select 'create new key store' in the following window and fill in the appropriate fields, but when I finish and click ok I get this error...:
Picked up _JAVA_OPTIONS:- Xverify:none
I've tried a few solutions, all via the terminal:
unset _JAVA_OPTIONS
JAVA_OPTIONS="-Djava.io.tmpdir=$HOME/tmp"
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS" && unset _JAVA_OPTIONS && alias java='java "$_SILENT_JAVA_OPTIONS"'
...but I'm still getting an error when I try to generate a signed bundle. How do I stop this error so the new key store is created successfully? Thanks.

Categories

Resources