android


'maps' in google.maps.LatLngBounds() shows “Cannot resolve symbol maps”


Well, as the title says whenever i type google.maps.LatLngBounds() or any other method in google.maps.*, it shows that maps cannot be resolved. Now i know this has been asked before and most are solved by the solutions given. But not for me, I tried everything but can't get this solved with any given solutions. What i did:
Installed google play services from SDK manager with all the four available support Repositories.
Added play services in dependencies (Gradle), and that didn't work (with and without minifyEnabled).
Currently have these in Gradle
compile 'com.google.android.gms:play-services-maps:10.2.4'
compile 'com.google.android.gms:play-services-location:10.2.4'
have this in manifest
uses-library android:name="com.google.android.maps"
Here is my Activity
package com.impactus.impactus_sensebox;
import android.database.Cursor;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
public class ArchiveMap extends FragmentActivity implements OnMapReadyCallback {
Marker markerarray[]=new Marker[25];
int i;
private GoogleMap mMap;
double latitude;
double longitude;
ImpactusDataBaseAdapter impactusadapter;
Cursor impactuscursor;
var bounds = new google.maps.LatLngBounds();
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_archive_map);
i=0;
impactusadapter=new ImpactusDataBaseAdapter(this);
impactusadapter=impactusadapter.open();
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
#Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
impactuscursor = impactusadapter.MapperReturn();
impactuscursor.moveToFirst();
while (!impactuscursor.isLast()) {
latitude=Double.parseDouble(impactuscursor.getString(0));
longitude=Double.parseDouble(impactuscursor.getString(1));
LatLng sydney = new LatLng(latitude, longitude);
markerarray[i]=mMap.addMarker(new MarkerOptions().position(sydney).title(impactuscursor.getString(2)));
bounds.extend(markerarray[i].getPosition());
i++;
impactuscursor.moveToNext();
}
latitude=Double.parseDouble(impactuscursor.getString(0));
longitude=Double.parseDouble(impactuscursor.getString(1));
LatLng sydney = new LatLng(latitude, longitude);
markerarray[i]=mMap.addMarker(new MarkerOptions().position(sydney).title(impactuscursor.getString(2)));
bounds.extend(markerarray[i].getPosition());
}
#Override
protected void onDestroy() {
super.onDestroy();
// Close The Database
impactuscursor.close();
impactusadapter.close();
ImpactusDataBaseAdapter.impactuscursor.close();
}
#Override
protected void onStop(){
super.onStop();
impactuscursor.close();
impactusadapter.close();
ImpactusDataBaseAdapter.impactuscursor.close();
}
}
My current Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.impactus.impactus_sensebox"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-maps:10.2.4'
compile 'com.google.android.gms:play-services-location:10.2.4'
testCompile 'junit:junit:4.12'
}
My manifest (removed Api key)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.impactus.impactus_sensebox">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-library android:name="com.google.android.maps" />
<application
android:allowBackup="true"
android:icon="#drawable/web_hi_res_512"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BTconnect"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="" />
<activity android:name=".ArchiveMap" />
<activity android:name=".SecondScreen"></activity>
</application>
</manifest>
var, maps, extend are all unresolved symbols.
When i click google with ctrl key pressed, it does become blue with underline, but on clicking nothing opens up.
By making the lines with these symbols as comments, my activity runs just fine by pulling latitude and longitude from a database and placing a marker for each.

Related Links

Directories to be removed under platform while running HP Fortify for ionic app?
Custom SwipeRefreshLayout in Android
Scanning for available bluetooth devices and get the name of all the device(But i am getting null at the name of some Devices)
BottomSheetDialogFragment - Allow scrolling child
Why does Android use multiple contexts and every one is different?
Android listener for return key on EditText not working for every device
How do I change the size of the text in a Tab? [duplicate]
Couldn't locate or instantiate custom event: “com.mopub.mobileads.VungleInterstitial”
Camera intent occassional fails
Error : MainActivity is not an enclosing class
My app crashes when I place the 4th column in my databases's query
Glide - javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
ViewPager extending PagerAdapter is not able to set view
How much time is needed to restart a sticky service after it was killed?
Create an app which shows wifi available connections
How to handle ThreadPool hitting the server connection limit

Categories

HOME
phpword
scikit-learn
ecmascript-6
powerpoint
youtube-data-api-v3
pascal
battery
oracle-apex-5
jsf-2.2
javacc
cq5
interpolation
qpython
sendgrid-api-v3
enthought
line
supervisor
gkturnbasedmatch
pybossa
frequency-distribution
shared-libraries
dynatrace
eip
3nf
flatpak
cumulocity
keytool
intershop
nodemcu
rubymotion
blade
href
named-entity-recognition
object-storage
surveymonkey
opentk
sqlpackage
twiml
panoramas
mobx
kudu
mockjax
cart
deltaspike
autolisp
wacom
card.io
installshield-le
sql-server-ce
verifiable-c
typesafe-config
opensmpp
mcustomscrollbar
apollostack
puredata
rserve
jqchart
pybrain
offline.js
android-instrumentation
renaming
stripe-connect
redistributable
flex4.6
expectations
firebase-security
cfchart
php-socket
spreadjs
mobiledoc-kit
state-restoration
slash
uncompress
liquid-layout
node-serialport
webmatrix-3
android-vibration
wcm
raygun
create.js
angular-carousel
cuba
grails-domain-class
matrix-inverse
memset
vsx
authlogic
multitasking
eclipse-kepler
model-driven-development
mbunit
jeromq
modular
abstract-data-type
traceability
http-status-code-410
extreme-programming
cuda-gdb
jdb
lr
creole
uipagecontrol
unattended-processing
tmx
cdonts
uideviceorientation
silent
drupal-fivestar
dot-emacs
tabpanel
burndowncharts
strtod
windows-identity
linfu-dynamicproxy

Resources

Encrypt Message