Gradle error with Android-studio and googleMap api - google-maps

I created a simple project to test Google Api under android studio , but I have this error I tried to correct it by adding maps.jar to librairies of project structure no way :
Information:Compilation completed with 12 errors and 0 warnings in 17 sec
Information:12 errors
Information:0 warnings
/home/phenix-dz/AndroidStudioProjects/Geolocalisation/Geolocalisation/src/main/java/com/example/geolocalisation/MainActivity.java
Error:Error:line (4)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (5)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (6)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (9)Gradle: error: cannot find symbol class MapActivity
Error:Error:line (11)Gradle: error: cannot find symbol class MapView
Error:Error:line (12)Gradle: error: cannot find symbol class MapController
Error:Error:line (16)Gradle: error: cannot find symbol variable super
Error:Error:line (17)Gradle: error: cannot find symbol method setContentView(int)
Error:Error:line (19)Gradle: error: cannot find symbol class MapView
Error:Error:line (19)Gradle: error: cannot find symbol method findViewById(int)
Error:Error:line (14)Gradle: error: method does not override or implement a method from a supertype
Error:Error:line (25)Gradle: error: method does not override or implement a method from a supertype
also I tried to add this code :
apply plugin: "java"
dependencies {
compile files('/home/phenix-dz/android-studio/sdk/add-ons/google_apis-671458-mac-x86/libs/maps.jar')
}
in build.gradle file but it gives me a same error.
Thanks

Related

Re-frame dispatches and subscribes not working in the repl and test files

I have a re-frame project, and my events, subs and db cljs files are populated. I use these three in my project and it works well. But I created a test file, and called subscribe and dispatch in it like so:
(deftest category-filter-test
(dispatch [:add-filter "cat"])
(is (= #(subscribe [:filters]) ["cat"]))
)
And that doesn't work. I get
#object[Error Error: No protocol method IDeref.-deref defined for type undefined: ]
On the other hand, if I try to run subscribe in the shadow-cljs repl, I get the following error:
------ WARNING - :undeclared-ns ------------------------------------------------
Resource: :1:2
No such namespace: user, could not locate user.cljs, user.cljc, or JavaScript source providing "user"
--------------------------------------------------------------------------------
------ WARNING - :undeclared-var -----------------------------------------------
Resource: :1:2
Use of undeclared Var user/start
--------------------------------------------------------------------------------
ReferenceError: user is not defined
at eval (eval at shadow$cljs$devtools$client$browser$global_eval (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.browser.js), <anonymous>:1:1)
at eval (<anonymous>)
at Object.shadow$cljs$devtools$client$browser$global_eval [as global_eval] (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.browser.js:758:16)
at eval (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.browser.js:767:44)
at Object.shadow$cljs$devtools$client$env$repl_call [as repl_call] (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.env.js:167:108)
at Object.shadow$cljs$devtools$client$browser$repl_invoke [as repl_invoke] (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.browser.js:766:46)
at shadow$cljs$devtools$client$browser$handle_message (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.browser.js:844:37)
at eval (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.env.js:307:151)
at Object.shadow$cljs$devtools$client$env$process_next_BANG_ [as process_next_BANG_] (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.env.js:289:90)
at Object.shadow$cljs$devtools$client$env$process_ws_msg [as process_ws_msg] (http://localhost:3689/js/workspaces/cljs-runtime/shadow.cljs.devtools.client.env.js:310:40)
How to fix these two errors?

Cannot find symbol import com.google.android.gms.maps.model.StreetViewSource?

I am working on an Ionic Project where i am getting below errors for google maps while building the app.
import com.google.android.gms.maps.model.StreetViewSource;
^
symbol: class StreetViewSource
location: package com.google.android.gms.maps.model
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:87: error: cannot find symbol
StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
^
symbol: class StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:88: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:88: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:280: error: cannot find symbol
StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
^
symbol: class StreetViewSource
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:281: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:281: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
In package.json:
"cordova-plugin-googlemaps": "^2.4.6",
"#ionic-native/google-maps": "^4.9.1"
In project.properties:
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.2=com.google.android.gms:play-services-auth:11.+
cordova.system.library.3=com.google.android.gms:play-services-identity:11.+
cordova.gradle.include.1=twitter-connect-plugin/offershare-twitter.gradle
cordova.system.library.4=com.android.support:support-v4:24.1.1+
cordova.system.library.5=com.squareup.okhttp3:okhttp:3.+
cordova.gradle.include.2=cordova-plugin-googlemaps/offershare-tbxml-android.gradle
cordova.system.library.6=com.google.android.gms:play-services-maps:11.+
cordova.system.library.7=com.google.android.gms:play-services-location:11.+
cordova.system.library.8=com.android.support:support-core-utils:26.1.0
Which version of google maps should i use?

RESTful - CodeIgniter 3.1.5 - Fatal Error, Call to undefined function factory

I'm trying to make "RESTful" using CodeIgniter 3.1.5 and libraries https://github.com/chriskacerguis/codeigniter-restserver
I get this error:
Fatal error: Call to undefined factory function () in D:\AppServ\www\restful\application\libraries\REST_Controller.php on line 857
A PHP Error was encountered
Severity: Error
Message: Call to undefined function factory ()
Filename: libraries/REST_Controller.php
Line Number: 857
Backtrace:
(Not my code, but it is example from codeigniter-restserver)
enter in line 61 of autoload.php
$autoload['libraries'] = array('database','Format');
I solved it that way.

Error in building itk with GDCM git repository

I build ITK with gdcm official release for windows. But its not having some of file that I'm using in further coding. So I have to use git version of gdcm cause its having those which I needed but following error encountered when I am trying to build ITK with ITK_USE_SYSTEM_GDCM and using gdcm git version to build gdcm bin.
>------ Build started: Project: ITKIOGDCM, Configuration: Debug Win32 ------
80>Compiling...
80>itkGDCMImageIO.cxx
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMImageIO.cxx(41) : fatal error C1083: Cannot open include file: 'gdcmImageHelper.h': No such file or directory
80>itkGDCMSeriesFileNames.cxx
80>D:\ITK\src\Modules\IO\GDCM\include\itkGDCMSeriesFileNames.h(154) : error C2664: 'void gdcm::SerieHelper::AddRestriction(const gdcm::TagKey &)' : cannot convert parameter 1 from 'const std::string' to 'const gdcm::TagKey &'
80> Reason: cannot convert from 'const std::string' to 'const gdcm::TagKey'
80> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(29) : error C2248: 'gdcm::SerieHelper::SerieHelper' : cannot access protected member declared in class 'gdcm::SerieHelper'
80> D:\GDCM\gdcm\src\gdcmSerieHelper.h(198) : see declaration of 'gdcm::SerieHelper::SerieHelper'
80> D:\GDCM\gdcm\src\gdcmSerieHelper.h(64) : see declaration of 'gdcm::SerieHelper'
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(160) : error C2027: use of undefined type 'gdcm::File'
80> D:\GDCM\gdcm\src\gdcmSerieHelper.h(34) : see declaration of 'gdcm::File'
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(160) : error C2227: left of '->IsReadable' must point to class/struct/union/generic type
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(163) : error C2027: use of undefined type 'gdcm::File'
80> D:\GDCM\gdcm\src\gdcmSerieHelper.h(34) : see declaration of 'gdcm::File'
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(163) : error C2227: left of '->GetFileName' must point to class/struct/union/generic type
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(166) : error C2027: use of undefined type 'gdcm::File'
80> D:\GDCM\gdcm\src\gdcmSerieHelper.h(34) : see declaration of 'gdcm::File'
80>..\..\..\..\..\src\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx(166) : error C2227: left of '->GetFileName' must point to class/struct/union/generic type
80>itkGDCMImageIOFactory.cxx
80>Generating Code...
80>Build log was saved at "file://d:\ITK\binGDCM\Modules\IO\GDCM\src\ITKIOGDCM.dir\Debug\BuildLog.htm"
80>ITKIOGDCM - 9 error(s), 0 warning(s)
Please help.
You are mixing the very old and deprecated GDCM 1.x with GDCM 2.x. They are actually API incompatible.

Cannot compile MySQL++

I am trying to compile MySQL++ 3.1.0 with the command:
mingw32-make -f Makefile.mingw
After a set of files gets compiled (e.g. beemutex.cpp, cmdline.cpp, connection.cpp, ...), I get these errors:
g++ -c -o mysqlpp_sql_buffer.o -g -mthreads -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -DHAVE_MYSQL_SSL_SET -I"C:\Program Files\MySQL\MySQL Server 5.5\include" -MT
mysqlpp_sql_buffer.o -MFmysqlpp_sql_buffer.o.d -MD -MP lib/sql_buffer.cpp
In file included from lib/sql_buffer.h:31:0,
from lib/sql_buffer.cpp:26:
lib/refcounted.h:258:2: error: 'size_t' does not name a type
lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer<T, Destroyer>::RefCountedPointer()':
lib/refcounted.h:89:2: error: class 'mysqlpp::RefCountedPointer<T, Destroyer>' does not have any field named 'refs_'
lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer<T, Destroyer>::RefCountedPointer(T*)':
lib/refcounted.h:100:2: error: class 'mysqlpp::RefCountedPointer<T, Destroyer>' does not have any field named 'refs_'
lib/refcounted.h:104:4: error: 'refs_' was not declared in this scope
lib/refcounted.h:104:16: error: expected type-specifier before 'size_t'
lib/refcounted.h:104:16: error: expected ';' before 'size_t'
lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer<T, Destroyer>::RefCountedPointer(const ThisType&)':
lib/refcounted.h:112:2: error: class 'mysqlpp::RefCountedPointer<T, Destroyer>' does not have any field named 'refs_'
lib/refcounted.h:115:8: error: 'refs_' was not declared in this scope
lib/refcounted.h: In destructor 'mysqlpp::RefCountedPointer<T, Destroyer>::~RefCountedPointer()':
lib/refcounted.h:125:7: error: 'refs_' was not declared in this scope
lib/refcounted.h: In member function 'void mysqlpp::RefCountedPointer<T, Destroyer>::swap(mysqlpp::RefCountedPointer<T, Destroyer>::ThisType&)':
lib/refcounted.h:246:13: error: 'refs_' was not declared in this scope
mingw32-make: *** [mysqlpp_sql_buffer.o] Error 1
Something could be wrong in my configuration, but I can't find what. It seems strange that it cannot find, e.g., size_t.
Thank you!
Platform:
Windows 7
MinGW 2011.09 / GCC 4.6.1
MySQL 5.5
mysql++ 3.1.0
Changing size_t() with std::size_t() in refcounted.h solved the problem. It now compiles.
I still have linking problems, but they should be different issues.