PDA

View Full Version : Problems with Android under Linux compilation.



tek2222
04-11-2013, 11:33 AM
I have successfully compiled the c++ sources with ndk-build.
I am still having problems with compilation with ant. Now I am having this error:


[javac] import com.android.vending.billing.IMarketBillingService;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/BillingService.java:57: cannot find symbol
[javac] symbol : class IMarketBillingService
[javac] location: class com.rtsoft.rtsimpleapp.BillingService
[javac] private static IMarketBillingService mService;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:52: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.AESObfuscator;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:53: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.LicenseChecker;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:54: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.LicenseCheckerCallba ck;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:55: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.ServerManagedPolicy;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:56: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.StrictPolicy;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:267: cannot find symbol
[javac] symbol : class LicenseCheckerCallback
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] private LicenseCheckerCallback mLicenseCheckerCallback;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:268: cannot find symbol
[javac] symbol : class LicenseChecker
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] private LicenseChecker mChecker;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:270: cannot find symbol
[javac] symbol : class LicenseCheckerCallback
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] private class MyLicenseCheckerCallback implements LicenseCheckerCallback
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:306: cannot find symbol
[javac] symbol : class ApplicationErrorCode
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity.MyLicenseChe ckerCallback
[javac] public void applicationError(ApplicationErrorCode errorCode)
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedMultiTouchInput.java:41: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.AESObfuscator;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedMultiTouchInput.java:42: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.LicenseChecker;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedMultiTouchInput.java:43: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.LicenseCheckerCallba ck;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedMultiTouchInput.java:44: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.ServerManagedPolicy;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedMultiTouchInput.java:45: package com.android.vending.licensing does not exist
[javac] import com.android.vending.licensing.StrictPolicy;
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/BillingService.java:702: package IMarketBillingService does not exist
[javac] mService = IMarketBillingService.Stub.asInterface(service);
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:379: cannot find symbol
[javac] symbol : class LicenseChecker
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] mChecker = new LicenseChecker(
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:381: cannot find symbol
[javac] symbol : class ServerManagedPolicy
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] new ServerManagedPolicy(this,new AESObfuscator(SALT, getPackageName(), deviceId)),
[javac] ^
[javac] /home/swelker/proton/RTSimpleApp/android/temp_final_src/com/rtsoft/rtsimpleapp/SharedActivity.java:381: cannot find symbol
[javac] symbol : class AESObfuscator
[javac] location: class com.rtsoft.rtsimpleapp.SharedActivity
[javac] new ServerManagedPolicy(this,new AESObfuscator(SALT, getPackageName(), deviceId)),
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 20 errors


I have read that this somehow needs a aidl file to generate ?
do I need another linux sdk or what is the problem?
do I need another platform tools set ? Imarketbillingservice must be part of the SDK, is it not ?

sad thing all the c++ stuff works so smoothly and the only thing causing problems is the Android configuation hell.

Stefan

Seth
04-12-2013, 10:59 AM
Sadly, I'm still using these versions:

Android SDK Tools 19
NDK: r8
Ant: 1.8.3

To use the latest version with Proton, changes are required.. and I just haven't felt like dealing with it (my current stuff works fine for me), but I eventually will have to.

Check this thread (http://www.rtsoft.com/forums/showthread.php?5604-build-bat-failed-on-Windows-using-ndk-r8b-sdk-20-0-1), it has links on downloading the old versions and also info on how to hack it to work with the new versions.

tek2222
04-19-2013, 07:45 PM
I managed to get the Apps compiled.

I can start RT3dApp and RTBarebones

The app crashes instantly :(
This is the adb logcat output.

Any ideas?

EDIT : Nevermind, im just in the process of converting the .bat files to linux .sh files.




Shutting down VM
W/dalvikvm( 1550): threadid=1: thread exiting with uncaught exception (group=0x416fa930)
E/AndroidRuntime( 1550): FATAL EXCEPTION: main
E/AndroidRuntime( 1550): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.rtsoft.rtbarebones/com.rtsoft.rtbarebones.Main}: java.lang.ClassNotFoundException: Didn't find class "com.rtsoft.rtbarebones.Main" on path: /data/app/com.rtsoft.rtbarebones-1.apk
E/AndroidRuntime( 1550): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2106)
E/AndroidRuntime( 1550): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2230)
E/AndroidRuntime( 1550): at android.app.ActivityThread.access$600(ActivityThre ad.java:141)
E/AndroidRuntime( 1550): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1234)
E/AndroidRuntime( 1550): at android.os.Handler.dispatchMessage(Handler.java:99 )
E/AndroidRuntime( 1550): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1550): at android.app.ActivityThread.main(ActivityThread.jav a:5041)
E/AndroidRuntime( 1550): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1550): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1550): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:793)
E/AndroidRuntime( 1550): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:560)
E/AndroidRuntime( 1550): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1550): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.rtsoft.rtbarebones.Main" on path: /data/app/com.rtsoft.rtbarebones-1.apk
E/AndroidRuntime( 1550): at dalvik.system.BaseDexClassLoader.findClass(BaseDex ClassLoader.java:65)
E/AndroidRuntime( 1550): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 01)
E/AndroidRuntime( 1550): at java.lang.ClassLoader.loadClass(ClassLoader.java:4 61)
E/AndroidRuntime( 1550): at android.app.Instrumentation.newActivity(Instrument ation.java:1054)
E/AndroidRuntime( 1550): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2097)
E/AndroidRuntime( 1550): ... 11 more
W/ActivityManager( 392): Force finishing activity com.rtsoft.rtbarebones/.Main
W/ActivityManager( 392): Activity pause timeout for ActivityRecord{4260b898 u0 com.rtsoft.rtbarebones/.Main}
W/ActivityManager( 392): Activity destroy timeout for ActivityRecord{4260b898 u0 com.rtsoft.rtbarebones/.Main}
W/Settings( 704): Setting auto_time_zone has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
D/AlarmManagerService( 392): Kernel timezone updated to -120 minutes west of GMT

tek2222
04-19-2013, 09:37 PM
Got it running under linux with newer sdk and r8b .

Dima Litvinov
05-02-2013, 05:43 PM
Hi, tek!

I'm also trying to run Proton examples under the latest Android SDK/NDK.
I've successfully compiled RTSimpleApp and installed it onto emulator (but there it behaves a bit strange...).
If you managed to convert .bat files into .sh files and it works - would you please post these files here?
Thanks!

tek2222
05-02-2013, 06:07 PM
It works almost completely, i dont have the rttex converter for linux however, i can run this with wine.

I zipped it, it wouldnt let me upload a .sh.

4695