When trying to compile, I get the following errors:
Error:(59, 13) error: cannot find symbol class InstanceID
Error:(59, 37) error: cannot find symbol variable InstanceID
Error:(60, 59) error: package R does not exist
Error:(61, 21) error: cannot find symbol variable GoogleCloudMessaging
Error:(88, 9) error: cannot find symbol variable LocalBroadcastManager
Error:(117, 9) error: cannot find symbol class GcmPubSub
Error:(117, 28) error: cannot find symbol variable GcmPubSub
This is in a module, which is compiled as dependent on play-services:
com.google.android.gms:play-services:7.8.0 compile
I have tried cleaning and building, invalidating the cache and restarting. What am I missing here? Why can't it find the play-services library?
Related
Whenever I enable Git in any Flutter Project in Android Studio it gives me the following warning when I try to commit:
9 files contain problems.
18 errors and 12 warnings found.
Would you like to review them?
Is this supposed to happen? Because it also happens on a fresh standard Flutter App without any modifications. This is what it shows when clicked to review.
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\AndroidManifest.xml
Warning:(1, 2) Should set `android:versionCode` to specify the application version
Warning:(1, 2) Should set `android:versionName` to specify the application version
Warning:(5, 9) Unknown attribute android:icon
Warning:(8, 13) Unknown attribute android:launchMode
Warning:(9, 13) Unknown attribute android:theme
Warning:(10, 13) Unknown attribute android:configChanges
Warning:(11, 13) Unknown attribute android:hardwareAccelerated
Warning:(11, 13) Attribute `hardwareAccelerated` is only used in API level 11 and higher (current min is 1)
Warning:(12, 13) Unknown attribute android:windowSoftInputMode
Warning:(12, 13) Attribute `windowSoftInputMode` is only used in API level 3 and higher (current min is 1)
Error:(19, 33) Cannot resolve symbol '#style/NormalTheme'
Error:(28, 33) Cannot resolve symbol '#drawable/launch_background'
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\build.gradle
Error:(1, 27) Cannot resolve symbol 'Properties'
Error:(11, 15) Cannot resolve symbol 'GradleException'
C:\Users\me\AndroidStudioProjects\flutter_app\android\settings.gradle
Error:(3, 31) Cannot resolve symbol 'File'
Error:(4, 22) Cannot resolve symbol 'Properties'
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\kotlin\com\heitorfranca\flutter_app\MainActivity.kt
Error:(3, 19) Unresolved reference: embedding
Error:(5, 21) Unresolved reference: FlutterActivity
C:\Users\me\AndroidStudioProjects\flutter_app\android\build.gradle
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\res\drawable\launch_background.xml
Error:(4, 29) Cannot resolve symbol '#android:color/white'
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\res\drawable-v21\launch_background.xml
Error:(4, 29) Cannot resolve symbol '?android:colorBackground'
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\res\values-night\styles.xml
Error:(4, 39) Cannot resolve symbol '#android:style/Theme.Black.NoTitleBar'
Error:(7, 21) Cannot resolve symbol 'android:windowBackground'
Error:(15, 39) Cannot resolve symbol '#android:style/Theme.Black.NoTitleBar'
Error:(16, 21) Cannot resolve symbol 'android:windowBackground'
C:\Users\me\AndroidStudioProjects\flutter_app\android\app\src\main\res\values\styles.xml
Error:(4, 39) Cannot resolve symbol '#android:style/Theme.Light.NoTitleBar'
Error:(7, 21) Cannot resolve symbol 'android:windowBackground'
Error:(15, 39) Cannot resolve symbol '#android:style/Theme.Light.NoTitleBar'
Error:(16, 21) Cannot resolve symbol 'android:windowBackground'```
Following the install instructions via fabric and doing everything via Android Studio but I'm getting the following errors
Error:(6, 39) error: package com.crashlytics.android.answers does not exist
Error:(26, 29) error: package io.fabric.sdk.android does not exist
Error:(66, 27) error: cannot find symbol class Answers
Error:(66, 5) error: cannot find symbol variable Fabric
I got it working by following the manual installation on the Fabric website.
I picked LoginActivity template from Android Studio and started working on it. When I tried to run the project it gave me following errors:
Error:(10, 37) error: cannot find symbol class GooglePlayServicesClient
Error:(12, 35) error: cannot find symbol class PlusClient
Error:(18, 44) error: package GooglePlayServicesClient does not exist
Error:(19, 33) error: package GooglePlayServicesClient does not exist
Error:(33, 13) error: cannot find symbol class PlusClient
Error:(276, 12) error: cannot find symbol class PlusClient
Error:(75, 31) error: package PlusClient does not exist
Error:(157, 65) error: package PlusClient does not exist
Error:(236, 5) error: method does not override or implement a method from a supertype
Attached is the screen shot for my Android Studio version and SDK downloaded on my machine.
I know that I need to migrate to Google API Client.
So my questions are:
Is there any document to do the same which provides step by step guide ?
Why default template provided with Android Studio are not working ?
I just downloaded the https://github.com/baugarten/Android-Image-Edit from git hub but when i import project i have a lot of errors.i think i should import the library's but i don't know which one
these are some errors
Error:(7, 27) error: package org.apache.sanselan does not exist
Error:(60, 22) error: package com.google.ads does not exist
Error:(136, 13) error: cannot find symbol class AdView
Error:(179, 40) error: package AdSize does not exist
Error:(666, 46) error: cannot find symbol variable ExifTagConstants
The errors like "cannot find symbol" is because this class is not found on your repository. Find and add them.
The errors like "...does not exist" is because you should import these libraries into your project.
I recently started using IntelliJ to build my android application project. I imported my sherlock library as a module and added the dependency to my project. However when I try to rebuild my project to check any errors I get a lines of 10 errors like this:
Error:(3, 17) java: package org.junit does not exist
Error:(4, 24) java: package org.junit.runner does not exist
Error:(5, 23) java: package org.robolectric does not exist
Error:(7, 38) java: package org.fest.assertions.api does not exist
Error:(7, 1) java: static import only from classes and interfaces
Error:(9, 2) java: cannot find symbol
symbol: class RunWith
Error:(11, 6) java: cannot find symbol
symbol: class Test
location: class com.actionbarsherlock.internal.ResourcesCompatTest
Error:(13, 20) java: cannot find symbol
symbol: method cleanActivityName(java.lang.String,java.lang.String)
location: class com.actionbarsherlock.internal.ResourcesCompatTest
Error:(15, 20) java: cannot find symbol
symbol: method cleanActivityName(java.lang.String,java.lang.String)
location: class com.actionbarsherlock.internal.ResourcesCompatTest
Error:(17, 19) java: cannot find symbol
symbol: method cleanActivityName(java.lang.String,java.lang.String)
location: class com.actionbarsherlock.internal.ResourcesCompatTest
looks like the junit.jar is missing in your classpath. Add it and it should work.
you can check if the plugin is installed if it is. it is just matter of adding it to class path you can do it automatically by selecting the junit word and then press on the inspection left side yellow bulb choose "add junit to classpath"
Adding below line in build.gradle solved the problem...
compile 'com.android.support.test:runner:0.5'