Phonegap Android Cordova buid Failed - android

I am trying build a Android project in Phonegap.
On "cordova build" command i am getting the below error
My project folder Path: Audio\platforms\android\...
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:43: error: cannot find symbol
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:38: error: cannot find symbol
CordovaLib\src\org\apache\cordova\ExposedJsApi.java:43: error: cannot find symbol
CordovaLib\src\org\apache\cordova\IceCreamCordovaWebViewClient.java:34: error: cannot find symbol
CordovaLib\src\com\squareup\okhttp\internal\http\HttpsURLConnectionImpl.java:347: error: method does not override or implement a method from a supertype
[javac] #JavascriptInterface
...
Basically they are pointing to my "CordovaLib\src" #JavascriptInterface. Why is this, Where do i am missing
Please Help ..

CordovaLib\src\com\squareup\okhttp\internal\http\HttpsURLConnectionImpl.java:347: method does not override or implement a method from a supertyp **this error showing**
Some out of date packages on you machine were creating this. please upgrade everything it will works fine.

Related

Flutter Webview throws compiling error -ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView

I am using Webview version
webview_flutter: ^2.0.6
The android studio while running throws this error and stop the build
Os Version
minSdkVersion 19
targetSdkVersion 30
A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31:
error: cannot find symbol private
ThreadedInputConnectionProxyAdapterView proxyAdapterView;
^ symbol: class ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView
A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112:
error: cannot find symbol
new ThreadedInputConnectionProxyAdapterView(
^ symbol: class ThreadedInputConnectionProxyAdapterView location: class
InputAwareWebView Note: Some input files use or override a deprecated
API. Note: Recompile with -Xlint:deprecation for details. 2 errors
FAILURE: Build failed with an exception.
How to fix this error?
ThreadedInputConnectionProxyAdapterView has wrong extension .jav
just change it to .java until the flutter team release the fix.
Please refer to the github link for the issue
https://github.com/flutter/flutter/issues/82800
As Ravi stated, renaming the file extension to .java does the trick.
The file can be found at:
{your flutter folder}\.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\ThreadedInputConnectionProxyAdapterView.java

Cannot find module '#angular/compiler-cli/ngtoolds2'

i'm getting the following error
ionic-app-script task: 'build'
Error: cannot find module '#angular/compiler-cli/ngtoolds2'
can anyone help me with this problem in angular?
There is no module called #angular/compiler-cli/ngtoolds2.
It should be angular-cli-tools what you are looking for .
https://www.npmjs.com/package/angular-cli-tools

Cannot find symbol toArrayList() android react native and react-native-admob

Deps:
"native-base": "2.3.5",
"react": "16.0.0",
"react-native": "0.50.4",
"react-native-admob": "^2.0.0-beta.3",
After an update from RN 0.45 to 0.50 and RN-Admob from 1.3.2 to 2.0.0-beta.3
When trying to build with react-native run-android
/node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobInterstitialAdModule.java:117:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java:129:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNPublisherBannerViewManager.java:252:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNPublisherBannerViewManager.java:271:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray
/Users/dobre/Desktop/projects//node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobBannerViewManager.java:223:
error: cannot find symbol
ArrayList list = nativeArray.toArrayList();
^ symbol: method toArrayList() location: variable nativeArray of type
ReadableNativeArray 5 errors
:react-native-admob:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':react-native-admob:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
I tried also RN 0.51 and manual unlink and re-link but nothing worked.
I think your android project still have the old linking.
You should open your project in android studio and check your main activity class
Try to check your MainActivity first, and even if error occurs. Then i think you have to downgrade your react-native-admob version form v2.0.0 to v1.3.2. It will work definitely.
Because, there is some issue in v2.0.0 which is still beta. You can check more about this issue on github here, https://github.com/sbugert/react-native-admob/issues/231
After days of investigations and unlinking and re-linking I solved it with:
maven {
url "$rootDir/../node_modules/react-native/android"
}
in build.gradle file.
Old url was "$projectDir/../../node_modules/react-native/android"
So it was a gradle issue. When building it used to get old react-native android libs.
Update the file :- Build.gradle(react-native-admob)
//implementation 'com.google.android.gms:play-services-ads:+' // Comment this line
implementation 'com.google.android.gms:play-services-ads:19.7.0' // Add this line

andEngine Android-Studio linker Error during Build

I took the source of AndEngine from their git repo, downloaded a fresh AndroidStudio, sdk and ndk,imported it, and tried to creat a simple new empty GameActivity extends BaseGameActivity.
But I could not start it, cause I get the following errors:
/home/uhu/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj/local/armeabi-v7a/objs/andengine_shared//home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.o: in function Java_org_andengine_opengl_GLES20Fix_glVertexAttribPointer:/home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.c:9: error: undefined reference to 'glVertexAttribPointer'
/home/uhu/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj/local/armeabi-v7a/objs/andengine_shared//home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.o: in function Java_org_andengine_opengl_GLES20Fix_glDrawElements:/home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.c:13: error: undefined reference to 'glDrawElements'
Error:Execution failed for task ':andEngine:compileReleaseNdk'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/uhu/android-ndk-r9d/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/Android.mk APP_PLATFORM=android-15 NDK_OUT=/home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj NDK_LIBS_OUT=/home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/lib APP_ABI=all
Error Code:
2
Output:
/home/uhu/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj/local/armeabi-v7a/objs/andengine_shared//home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.o: in function Java_org_andengine_opengl_GLES20Fix_glVertexAttribPointer:/home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.c:9: error: undefined reference to 'glVertexAttribPointer'
/home/uhu/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj/local/armeabi-v7a/objs/andengine_shared//home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.o: in function Java_org_andengine_opengl_GLES20Fix_glDrawElements:/home/uhu/AndroidStudioProjects/aaa/andEngine/src/main/jni/src/GLES20Fix.c:13: error: undefined reference to 'glDrawElements'
collect2: ld returned 1 exit status
make: * [/home/uhu/AndroidStudioProjects/aaa/andEngine/build/intermediates/ndk/release/obj/local/armeabi-v7a/libandengine_shared.so] Error 1
Does anyone know how to fix this? Or if I'm just using the wrong tools, what can you recommend?
I managed to get my project to compile. The problem seems to me that AS and ndk dont work together well yet. Any case check my blog on setting up the project:-
AS and AndEngine setup
It seems to be easier using the official intellij version instead of android studio. And as both are very similar in use, it't doesn't really matter. Together with some ndk-build hints from the answer of lakshman5876, it finally worked very well. Thanks
http://www.jetbrains.com/idea/

com.google.android.maps does not exist strange error

I can't build my android project, it says that com.google.android.maps does not exist. It is way strange because in my project in libraries I have them. I rebuild the build.xml. The import com.google.android.maps.MapActivity; is not marked as error. What should I do?
Handling Resources...
Generating resource IDs...
C:\android-sdk-windows\tools\ant\build.xml:600: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 13 source files to C:\Users\iie\Documents\NetBeansProjects\AndroidApplication3\bin\classes
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:10: error: package com.google.android.maps does not exist
import com.google.android.maps.MapActivity;
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:16: error: cannot find symbol
public class MapMapa extends MapActivity {
symbol: class MapActivity
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:21: error: cannot find symbol
super.onCreate(icicle);
symbol: variable super
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:23: error: cannot find symbol
setContentView(R.layout.map);
symbol: method setContentView(int)
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:19: error: method does not override or implement a method from a supertype
#Override
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:26: error: method does not override or implement a method from a supertype
#Override
6 errors
C:\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
C:\android-sdk-windows\tools\ant\build.xml:600: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Make sure you
install the Google APIs in your Android SDK (this means the "Google APIs" choice instead of the "Android X.x" one)
specify to use this library in your manifest XML:
<uses-library android:name="com.google.android.maps" />
choose "Google API" as your "Build Target", not the "Android X.x" one.
FYI, when testing with the emulator AVD, you need to launch the "Google APIs" version instead of the "Android X.x" one.
ok, finally I managed to sort it out:
here is a link with everything:
http://code.davidjanes.com/blog/2009/11/13/18-hours-of-jar-hell-with-android-google-maps/
sorry for answering my own question

Categories

Resources