Hello Guys,
I am facing some issues to create the .apk file in the meteor. I am new in this technology
Can anyone have an idea how to create apk in meteor?
Hello Guys,
I am facing some issues to create the .apk file in the meteor. I am new in this technology
Can anyone have an idea how to create apk in meteor?
thanks for sharing the link with me but i am facing issue after adding platform meteor add-platform android.
Did you have the required software installed e.g. sdk, etc.?
Everything is in the Mobile guide above. Please go through the page thoroughly to guide you
hii David,
I am using meteor version 1.8 so in that any issue for create apk
Have you read and followed the meteor mobile guide above?
Do you install all requirements?
I think that works in linux or mac is better than windows.
david, i followed above meteor guide and added all requirements.
Please check below content after adding meteor add-platform android, after successfully adding platform.
I show this message :
Subproject Path: CordovaLib
android: added platform
After that i enter new command meteor run android-device at the time i am not able to do anything cmd through the error directly
please check the attached screen shots
yes i install java android studio all the requirements as need for create .apk
please check below screen to check this error
You are trying run-device, but I think this not works fine. Try build only.
meteor build
meteor build <directory-to-build> --server https://<your-server>
You can use the command line meteor build --help
to help you about parameters.
After adding meteor build --server .
I got same instruction as above screenshots
Microsoft Windows [Version 6.3.9600]
© 2013 Microsoft Corporation. All rights reserved.
D:\PRAMOD\theft-tamper-mobile>meteor run android-device
[[[[[ ~\D\PRAMOD\theft-tamper-mobile ]]]]]
=> Started proxy.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but
it should have a minimum version of 2.3.0 to ensure compatibility
with the current platform versions. Installing the minimum
version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1,
but it should have a minimum version of 4.1.0 to ensure
compatibility with the current platform versions. Installing the
minimum version for convenience, but you should adjust your
dependencies.
WARNING: You are testing your app on a remote device. For the mobile app
to be able to connect to the local server, make sure your device
is on the same network, and that the network configuration allows
clients to talk to each other (no client isolation).
=> Started MongoDB.
(node:5800) UnhandledPromiseRejectionWarning: Error: Command failed: adb -d logc
at -c -d logcat -c
âadbâ is not recognized as an internal or external command,
operable program or batch file.
at ChildProcess.exitCallback (C:\tools\utils\processes.js:151:23)
at emitTwo (events.js:131:20)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:5800) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1)
(node:5800) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --device:
Error: Command failed:
D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android\c
ordova\run
âdevice --device
{ CordovaError: Requirements check failed for JDK 1.8 or greater
at
D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android\c
ordova\lib\check_reqs.js:370:19
at _fulfilled
(D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android
cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done
(D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android
cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch
(D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android
cordova\node_modules\q\q.js:816:13)
at
D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android\c
ordova\node_modules\q\q.js:624:44
at runSingle
(D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android
cordova\node_modules\q\q.js:137:13)
at flush
(D:\PRAMOD\theft-tamper-mobile.meteor\local\cordova-build\platforms\android
cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
name: âCordovaErrorâ,
message: âRequirements check failed for JDK 1.8 or greaterâ,
code: 0,
context: undefined } 'CordovaError: Requirements check failed for JDK
** 1.8 or greater\n at**
** D:\PRAMOD\theft-**tamper-mobile\.meteor\local\cordova-build\platforms\an
droid\cordova\lib\check_reqs.js:370:19\n
at _fulfilled
(D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\a
ndroid\cordova\node_modules\q\q.js:854:54)\n
at self.promiseDispatch.done
(D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\a
ndroid\cordova\node_modules\q\q.js:883:30)\n
at Promise.promise.promiseDispatch
(D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\a
ndroid\cordova\node_modules\q\q.js:816:13)\n
at
D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\an
droid\cordova\node_modules\q\q.js:624:44\n
at runSingle
(D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\a
ndroid\cordova\node_modules\q\q.js:137:13)\n
at flush
(D:\PRAMOD\theft-tamper-mobile\.meteor\local\cordova-build\platforms\a
ndroid\cordova\node_modules\q\q.js:125:13)\n
at _combinedTickCallback (internal/process/next_tick.js:131:7)\n at
process._tickCallback (internal/process/next_tick.js:180:9)â
at ChildProcess.exitCallback (C:\tools\utils\processes.js:151:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:198:12)
=> awaited here:
at Function.Promise.await
(C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.wind
ows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:56:12)
at CordovaProject.runCommands (C:\tools\cordova\project.js:805:14)
at Promise.asyncApply (C:\tools\cordova\project.js:276:10)
at
C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.windo
ws.x86_64\dev_bundle\lib\node_modules\meteor-promise\fiber_pool.js:43:40
C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.windows.
x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^
undefined
=> awaited here:
at Function.Promise.await (C:\Users\Iqbal\AppData\Local.meteor\packages\met
eor-tool\1.8.0_1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise
\promise_server.js:56:12)
at Promise.asyncApply (C:\tools\cordova\run-targets.js:111:5)
at C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.w
indows.x86_64\dev_bundle\lib\node_modules\meteor-promise\fiber_pool.js:43:40
=> awaited here:
at Function.Promise.await (C:\Users\Iqbal\AppData\Local.meteor\packages\met
eor-tool\1.8.0_1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise
\promise_server.js:56:12)
at buildmessage.capture (C:\tools\cordova\runner.js:98:9)
at Object.capture (C:\tools\utils\buildmessage.js:283:5)
at CordovaRunner.startRunTargets (C:\tools\cordova\runner.js:97:37)
at AppRunner._runOnce (C:\tools\runners\run-app.js:754:21)
at AppRunner._fiber (C:\tools\runners\run-app.js:908:28)
at C:\tools\runners\run-app.js:398:12
Highlighted in bold are two errors i am facing since weeks, and unable to find any solution.
JDK installed is greater than 8 in fact i have tried using the latest version.
still i am unable to solve this
I think that you need put " " in your path, because it has space. My advice, never put space in your folders and files, if you is a software developer.
Here are my notes-to-self about how to build an Android APK in Meteor which have worked for me on Windows 10:
Your 'android' is not recognized
error suggests you didnât set the path as in those notes.
Definitely donât use spaces in the build path, as in the example in my notes, or enclose them in double quotes.
Hope this helps!
after remove the space i got this error
D:\ANISH_BACKUP\Anish\meteor\aok\theft-tamper>meteor build D:\ANISH_BACKUP\Anish
\meteor\aok\Output --server=http://theft-tamper-mobile.herokuapp.com/
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
Subproject Path: CordovaLib
nulluilding Cordova app for Android -
The Task.leftShift(Closure) method has been deprecated and is scheduled to be re
moved in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_e5zsvui3roau0su4daqdjkn9w.run(D:\ANISH_BACKUP\Anish\meteor\aok
theft-tamper.meteor\local\cordova-build\platforms\android\build.gradle:144)
Configuration âcompileâ in project â:â is deprecated. Use âimplementationâ inste
ad.
org.xwalk:xwalk_core_library:22+
WARNING: The specified Android SDK Build Tools version (23.0.3) is ignored, as i
t is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.
0.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove âbuildToolsVersion â23.0.3ââ from your build.gr
adle file, as each version of the Android Gradle Plugin now has a default versio
n of the build tools.
Exception while marshalling C:\Program Files (x86)\Android\android-sdk\build-too
ls\23.0.3\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files (x86)\Android\android-sdk\build-too
ls\23.0.3\package.xml. Probably the SDK is read-only
Checking the license for package Android SDK Build-Tools 26.0.2 in C:\Program Fi
les (x86)\Android\android-sdk\licenses
Warning: License for package Android SDK Build-Tools 26.0.2 not accepted.
Checking the license for package Android SDK Platform 26 in C:\Program Files (x8
6)\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26, Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and co
mplete the installation of the missing components using the Android Studio SDK M
anager.
Alternatively, to learn how to transfer the license agreements from one workst
ation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
=> Errors executing Cordova commands:
While building Cordova app for platform Android:
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
You have not accepted the license agreements of the following SDK
components:
[Android SDK Platform 26, Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements
and complete the installation of the missing components using the
Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one
workstation to another, go to
http://d.android.com/r/studio-ui/export-licenses.html
Try:
Run with --stacktrace option to get the stack trace. Run with --info or
âdebug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
at ChildProcess.whenDone
(D:\ANISH_BACKUP\Anish\meteor\aok\theft-tamper.meteor\local\cordova-build\pl
atforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:209:5)
=> awaited here:
at Function.Promise.await
(C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.wind
ows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:56:12)
at Promise.asyncApply (C:\tools\cordova\project.js:262:7)
at
C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.windo
ws.x86_64\dev_bundle\lib\node_modules\meteor-promise\fiber_pool.js:43:40
=> awaited here:
at Function.Promise.await
(C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.wind
ows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:56:12)
at CordovaProject.runCommands (C:\tools\cordova\project.js:805:14)
at CordovaProject.buildForPlatform
(C:\tools\cordova\project.js:260:10)
at buildmessage.enterJob (C:\tools\cli\commands.js:1126:30)
at Object.enterJob (C:\tools\utils\buildmessage.js:388:12)
at main.captureAndExit (C:\tools\cli\commands.js:1109:22)
at Object.capture (C:\tools\utils\buildmessage.js:283:5)
at Object.main.captureAndExit (C:\tools\cli\main.js:275:29)
at buildCommand (C:\tools\cli\commands.js:1085:10)
at Profile.run (C:\tools\cli\commands.js:909:25)
at Function.run (C:\tools\tool-env\profile.js:490:12)
at Promise.asyncApply (C:\tools\cli\commands.js:907:18)
at
C:\Users\Iqbal\AppData\Local.meteor\packages\meteor-tool\1.8.0_1\mt-os.windo
ws.x86_64\dev_bundle\lib\node_modules\meteor-promise\fiber_pool.js:43:40
please let me know where i am wrong
You can check what versions of Android Studio and Gradle? You download Android SDK build-tools and accept license? Because it is ask this.
Hii Raragao,
Current version: Android Studio 3.2.1
Android SDK tool :: 26.1.1
Gradle:: âcom.android.tools.build:gradle:3.2.1â