I am a .NEt developer but recently i am having to deal with some android /java code. I downloaded Android OS's camera app source code from following location:
https://android.googlesource.com/platform/packages/apps/Camera
Now, I am having these files on my Windows 7 machine. When I do a simple search of "How to compile android apk code on windows" most of the searches result in saying that it is very non trivial and I need Mac or Unix machine for it.
Now, Looks like this is all bunch of java files. But I am not sure what should b emy target environment to try to compile all these files?
Follow these steps:
Download adt bundle here
Extract the zip and start ecllipse ide
Create a new emulator on which you run your application. It looks like a mobile icon.
then goto file->import->android->existing android project to workspace
Browse to your downloaded location select your project
Run
Related
I created a flutter plugin for android and ios using the following command:
flutter create --org com.docscanner.ds --template=plugin --platforms=android,ios -i swift -a java complete_pdf_tools
The operation was carried out smoothly and then I opened android studio and clicked on the option Open and selected the folder created by the above command. The project opened but it shows error everywhere in all the .java files.
And also all the folders and files on the left are in yellow except lib folder.
This is how it looks:
I tried Invalidate Caches and android studio restart and system restart but no good. If I move cursor on top of any red colored word for example on embedding in 3rd line it says Cannot resolve symbol 'embedding' and for actions it suggests Find JAR on web and if I click on that action it says looking for Libraries and then says No libraries found for 'import io.flutter.embedding.engine.plugins.FlutterPlugin;'
The error is in .java files only. Same thing happens if I try to create the plugin from android studio itself by going New Flutter Project>and then it asks me for flutter sdk path, which is C:\src\flutter>now for project type i select plugin and select java for android and swift for ios, give project name, org name and finish
I am using windows 10 x64, flutter version stable 2.10.2, and Android Studio version Bumblebee 2021.1.1 Patch 1
What could be the cause of these errors.
Open example/android/build.gradle instead of android/build.gradle, then you have both app and plugin in your Project.
If an example app has both a main.dart file and .java & build.gradle files does that mean that there are two redundant ways for the example app to be run on an emulated Android device?
I can currently run the main.dart file on an emulated device in Android Studio, but when I try running the .java file it give me the error "Error: Gradle project sync failed. Please fix your project and try again."
It seems like the .java and gradle files directly compile to an Android .apk program when run, but my intuition was that the Dart code could also be compiled to an apk or ipa program.
When you make a new Flutter project it generate dart, android and iOS (if on a mac) code. For the most part we dont have to touch the underlying Java code.
But if you must you can open just the android folder in android studio and let gradle sync and build the project. You may also want to write platform specific code for either android or iOS.
Here is a guide on how you can do that https://flutter.dev/docs/development/platform-integration/platform-channels
tl;dr;
flutter generates native code for your dart code. You can also access native hardware by writing platform specific code.
I have converted a java jar file to a dll file using IKVM.
I have created a simple C# application in VS2015 that has the converted dll as a reference to it. I had installed IKVM package using the following command:
Install-Package IKVM -Version 8.1.5717
After the installation ended, my application has a list of IKVM dlls referenced to it.
I had created a setup project for this simple application using Visual Studio Setup project. After adding the Primary Output files and all the IKVM dlls to the setup, I am building the setup project and getting the following Microsoft Visual Studio 2005 window asking for vs_setup.msi file.
I found this file in 2 locations:
C:\Program Files (x86)\Microsoft Visual Studio 8\Microsoft Visual Studio 2005 Team Explorer - ENU\vs_setup.msi
"[DVD Drive]:\vss\vs_setup.msi"
When I am trying to point to those locations, I am getting the following window:
Why building the setup project in VS2015 required vs_setup.msi of VS2005?
How can I fix this issue in order to create the setup.exe file successfully?
Note: My OS is Windows 10
Update:
I have tried to reinstall Visual Studio 2005 SP1 but it didn't fix the issue
For some reason it seems that not all the features from your Visual Studio were installed to your system. This isn't a bug, it's just one of the ways that some features can be installed, as "run from the DVD" or "install on demand". When it asks for the MSI file it requires the exact same MSI file, which is internally identified with ProductCode and PackageCode guids, and if they don't match the requested MSI it won't be used. From that screen shot, it's clear that the Visual Studio Premier Partner Edition disk is required, not that Team Explorer MSI file.
Visual Studio setup projects aren't part of Visual Studio 2015 - there is an installer extension that needs to be installed separately, this thing:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2015InstallerProjects
I'll repeat that your comment saying it requires vs_setup.msi is not what the message actually says. It requires the install disk, and it's possible that with the Partner Edition Visual Studio the Installer Extension is on the disk, and that's why it wants the disk. The installer extension isn't installed, but it might be on that disk. If you haven't got that disk, try installing the Installer Extension from that link above.
I had install all cocos2dx requirements for that . when I create an cocos2dx project this directory's created :
now I want to open it on the android studio . now when I open the proj.android-studio I can't run project and it's need to edit configuration . now which configuration should i do for run this hello world game ?
and consider this I am completely new in cocos2dx .
thanks for any help
Unfortunately there isn't a strong support for the Android Studio. You should first compile using
cocos compile -p android --android-studio
You should run this command in the projects home directory (that contains Classes, proj.android-studio... folders)
After running this, cocos will create an .apk file in the bin/debug folder.
You can try to run this .apk on your device or to get different builds you can import the proj.android-studio to the Android Studio and change the settings. But whenever you change a file in the classes folder, you have to compile it again.
For convenience, I am keeping two IDE (Visual Studio and Android Studio) and command line open. I am editing my c++ files in Visual Studio, I am compiling the code through command line, then I am trying to debug with Android Studio.
Drag and drop your project in command promte.Then run "cocos compile -p android --android-studio".For more information refer this video link
Now you can use Android Studio for game development using Cocos2dx
Requirements -
Cocos2dx-3.16
Android Studio (v3.0.1)
Update Android SDK (Update API 23 to API 19) Recommended
NDK r14b (Do not use r16. It has compatibility issue with cocos2dx)
python (2.7.14)
Steps-
Install python ( While installation use Add path to all local hard
drive )
Read readme.md file to configure the basic requirements for project ( Like setting environment path )
Create new Cocos2dx cpp project
Import the proj.android-studio folder into Android Studio
Change the supported platform. If you got any error
Configure project settings. Click Open->Project structure and put Min and Max API support
Modify Android.mk. Refer this
https://stackoverflow.com/a/48045723/2052113
Build project
Run Project ( Your sample android game is ready )
I have downloaded the latest Android Studio and when I run studio64.exe it opens Android Studio as a standalone application, however I would like to install it to my system.
The website says there is an installation wizard however I get taken straight to the Android Studio start screen. Is there still a way to install it on a Windows machine?
Turns out that Android Studio is now portable - like Eclipse. In other words, there is no installing, you just get the zip file, which contains everything you need, such as the executables that run Android Studio. You'll need to store this folder somewhere relevant and create a shortcut to the studio(64).exe file to run it from desktop/start menu.
The SDK is also no longer bundled with Android Studio, so that will need to be downloaded separately.
As of this post the Android Studio installation instructions by Google are out of date.
you can get the sdk manager as stand alone installer.once installed you need to run it as "administrator", than only it will be able to download and install packages and api's. follow the given below link:
http://dl.google.com/android/installer_r23.0.2-windows.exe
Check if its in compatible mode with your OS version of your machine. Right click on the downloaded bundle > Move to properties> Compatibility tab> Select Compatibility tab> Tick the check-box- Run in Compatibility mode> Select your OS version from the drop down.
You will get the set up wizard :)
Worked for me :)