When i try to build system service application, i get this :
I use android studio 3.0.0
SDK API-24
Build tools 26.0.2
i use this documentation : https://docs.wso2.com/display/IoTS300/Integrating+the+Android+System+Service+Application#IntegratingtheAndroidSystemServiceApplication-Operationssupportedviathesystemserviceapplication
Information:Gradle tasks [clean, :app:assembleDebug]
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master \system-service\app\src\main\java\org\wso2\iot\system\service\api\NetworkConnectedReceiver.java
Error:(64, 28) error: cannot find symbol method getCurrentUser()
Error:(65, 70) error: cannot find symbol method getCurrentUser()
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\api\OTAServerManager.java
Error:(21, 26) error: cannot find symbol class NonNull
Error:(36, 18) error: cannot find symbol class SystemProperties
Error:(278, 30) error: cannot find symbol class NonNull
Error:(162, 41) error: cannot find symbol variable SystemProperties
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\api\SettingsManager.java
Error:(33, 42) error: cannot find symbol method setDeviceOwner(ComponentName)
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\SystemService.java
Error:(35, 18) error: cannot find symbol class SystemProperties
Error:(426, 42) error: cannot find symbol method getLegacyExternalStorageDirectory()
Error:(718, 21) error: cannot find symbol variable SystemProperties
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\utils\AppUtils.java
Error:(20, 19) error: cannot find symbol class PackageInstallObserver
Error:(22, 26) error: cannot find symbol class IPackageDeleteObserver
Error:(57, 9) error: cannot find symbol class PackageInstallObserver
Error:(57, 47) error: cannot find symbol class PackageInstallObserver
Error:(214, 9) error: cannot find symbol class IPackageDeleteObserver
Error:(214, 47) error: cannot find symbol class IPackageDeleteObserver
C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\utils\CommonUtils.java
Error:(53, 16) error: cannot find symbol method startServiceAsUser(Intent,UserHandle)
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED in 7s
Information:18 errors
Information:0 warnings
Information:See complete output in console
Note that in my sdk, i can see class NonNull and SystemProperties.
Thanks for help.
Regards.
It seems like you are not using correct target SDK and hidden APIs.
Please follow Prerequisites section in Customizing the android APK documentation to setup your android studio environment. Then you might be able to build system app.
Related
I am new to CGAL and C++ and I am running into compile errors when setting up the CGAL Polygonal_surface_reconstruction_Examples as described in the manual.
I have installed glpk-4.65 (https://sourceforge.net/projects/winglpk/) and then had to manually point CMake to the directory.
CMake made the VisualStudio2022 SLN file but when I try compiling I am getting the error below. I assume that there is something not set up correctly with GLPK but I am not sure how to resolve this.
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol glp_create_prob referenced in function "public: virtual bool __cdecl CGAL::GLPK_mixed_integer_program_traits<double>::solve(void)" (?solve#?$GLPK_mixed_integer_program_traits#N#CGAL##UEAA_NXZ) polyfit_example_user_provided_planes C:\dev\CGAL-5.4-examples\CGAL-5.4\examples\Polygonal_surface_reconstruction\sln\polyfit_example_user_provided_planes.obj 1
I think that I understand the concept "unresolved external symbol means" - the objects were all compiled and during the linking phase the linker could not find the definition (body) of that particular symbol anywhere. So I guess I either have to use the symbol differently or I have to add to the project some missing system library. I am not sure which is correct and how I can check that (no previous experience with RAD).
I am converting some old code (win95) to win10, I started a new project under the latest RAD Studio 10.3 and I added all the source files (add to project) manually. I saw an advice here that I should make sure that the compilers are not mixed. I can see that all source files are compiled with bcc32c. In the documentation I can see that Exception basically provides only various constructors http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.Exception .
During the linking phase I get the error above - [ilink32 Error] Error: Unresolved external 'System::Sysutils::Exception::{1173}...'
All the calls were originally Exception("constant") or Exception("constant" + AnsiStringVariable). As most of the problems were caused by old calling schemes I tried to change it to Exception(L"constant") and Exception(L"constant"+UnicodeString), but this is clearly not the problem.
Thanks for any advice.
So clearly this code:
if(x!=S0getb()) Exception("Bad final checksum!");
generates the error in question. The problem is the missing throw. Probably it somehow compiled in the previous versions and nobody noticed. I guess there is a difference between en error code for a missing function symbol and a missing class symbol. But I did not recognized that this is a function call while it should be a new class instance.
The correct code:
if(x!=S0getb()) throw Exception("Bad final checksum!");
fixes the issue.
I'm using C++-Builder of RAD 10.2 using the old classic Borland-compiler currently and am using same named source files in some projects. While the file names are identical, the contained classes are placed in different namespaces and those are used as subfolders as well, so the relative path within the project is unique always. Consider the following classes and the dirs they are stored in as example:
view::files_chooser::chosen_files::Dnd
view/files_chooser/chosen_files/Dnd.cpp
view::send_details::recipients::Dnd
view/send_details/recipients/Dnd.cpp
During compilation of the whole project, the following two object files are created:
Win32\Debug\tmp\Dnd.obj
Win32\Debug\tmp\Dnd_0.obj
There's no way to know which object file belongs to which class and in theory it's not a problem if each of them gets compiled always. But if not, it's important to know which object file to replace and the current behaviour is that always the file without index is replaced. Depending on former builds, that might work, if "Dnd_0.obj" contains the other class, but if not, the object file or the other class is missing now and linking fails.
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::~Dnd()' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::Dnd(view::send_details::recipients::All&, view::send_details::recipients::Events&)' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::updateDragDetailsSrc(System::TObject *, unsigned int)' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::disallowRowOn(System::TObject *, unsigned int, bool&) const' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::onOleDragStop(System::TObject *, int)' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unresolved external 'view::send_details::recipients::Dnd::updateDragDetailsDest(System::TObject *, unsigned int)' referenced from C:\USERS\[...]\WIN32\DEBUG\TMP\FMSENDDETAILS.OBJ
[ilink32 Error] Error: Unable to perform link
This can easily be reproduced by not compiling the whole project, but only the two individual classes. RAD doesn't seem to use a stable mapping of class file names to object file names, which could easily fix this problem. Some have reported similar problems in Visual Studio, but that seems to provide a way to manually define the resulting file name of the object file. Something which I couldn't find in RAD.
How does Clang handle such cases? Does it store object files within one and the same dir always as well? Does it use some stable naming scheme or is it able to keep the internal relative dir hierarchy of the project?
Thanks!
As requested, the following is an example command line invocation. As it contains the path of the output file to generate (-o.\Win32\Debug\tmp\Dnd.obj), I guess switching to Clang itself doesn't change a thing here, as comments already suggested.
bcc32 command line for "..\..\..\..\src\src\view\files_chooser\chosen_files\Dnd.cpp"
c:\program files (x86)\embarcadero\studio\19.0\bin\bcc32.exe -D_DEBUG;Winapi_MsxmlintfHPP;LOG4CXX_STATIC;XERCES_STATIC_LIBRARY -n.\Win32\Debug\tmp
-I[...] -y -Q -k -r- -c -tM -tW -C8
-o.\Win32\Debug\tmp\Dnd.obj -w-par -Od -v -vi- -H=.\Win32\Debug\tmp\raw.pch -H ..\..\..\..\src\src\view\files_chooser\chosen_files\Dnd.cpp
Success
Elapsed time: 00:00:00.4
error LNK2019: unresolved external symbol "public: static class cocos2d::network::HttpClient *
I am trying to make network call from cocos2d-x 3.2 and I am getting above error while compiling
I have included the file
include "network/HttpClient.h"
and I am getting error at
cocos2d::network::HttpClient::getInstance()->send(request);
Any help would be appreciated!
Issue resolved
right click on your project->add->references
add libnetwork from list.
I am trying to edit 'Summary Information' of a file. I found following code which works fine. But when I try to bring that code to my project, the build fails at Linking stage.
http://www.codeproject.com/Articles/16314/Access-the-Summary-Information-Property-Set-of-a-f
The error
1>Linking...
1>FileSummaryInfo.obj : error LNK2020: unresolved token (0A000015) IID_IPropertySetStorage
1>FileSummaryInfo.obj : error LNK2001: unresolved external symbol IID_IPropertySetStorage
1>E:\software\TagMyPics\TagMyPics\Debug\TagMyPics.exe : fatal error LNK1120: 2 unresolved externals
The program that I am working on is capable of identifying faces in an image. Once an image file is provided to the program, it detects the face and look up the database to find the name of the person. If name is not in the database it prompts user to enter the name. Then the name is added as a keyword in image file's summary. So when I want to find the images that my friend is in, I can easily search by name. For this I want to edit Keyword property.
Googling suggested that this may be due to the difference between a Win32 Console application (original) and a Win32 Forms application(my version). But I could not find a solution to get this to work.
Could you suggest a solution for this or an alternative?
I changed 'Project Property Pages' > 'Configuration Properties' > 'C / C++' > 'General' > 'Common Language Runtime Support to /clr. Earlier it was /clr:pure. Now it works
/clr allows having both managed and un-managed functions.
For more information read : Common Language Runtime Compilation and Mixed (Native and Managed) Assemblies
Can you check that the option to not link in the standard library is off (it
is by default). Make sure you've included any headers you need, and that
you're compiling and linking C++ files in C++ language mode. If all else
fails, try starting a new project and re-adding all your source files.
Try the steps in this Link