adb shell am start -a android.intent.action.VIEW -d "xxx.xxx.xxx"网址太长 80C

adb shell am start -a android.intent.action.VIEW -d "xxx.xxx.xxx"网址太长返回error: service name too long怎么解决

2个回答

1K还不够用的?你得多长呀

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
android用action.View显示图片问题

两个Activity,一个叫A,一个叫B。 A使用按钮发出一个隐式Intent,如下: Intent i = new Intent(); i.setAction("android.intent.action.View"); i.setType("image/png"); 在menifest文件中设置B的intent-filter,如下: <intent-filter> <action android:name="android.intent.action.View"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="image/png"/> </intent-filter> 运行程序,按下按钮,会出现对话框,让选择是用这个程序还是系统自带viewPicture. 选择后会报空指针错误。(因为没有指定图片资源) 然后我在A的Intent中指定图片资源的Uri: i.setData("android:resource://包名/drawable/图片名") 在B中解析Intent并显示在ImageView中: Uri uri = getIntent().getData(); ImageView view = (ImageView)findViewById(R.id.show); view.setImageUri(uri); 再运行程序,就报错:No activity found to handle the intent. 这是为什么??<<<<<<<<< 然后我在Intent中指定Component: i.setClass(包名,类名) 再执行程序,图片居然在B中显示出来了。 这是为什么??不是没有activity能接收intent吗???

关于ADB,请教如何通过指定APP打开目标网页

关于ADB,请教如何通过指定APP打开目标网页 比如用ADB命令通过QQ或者微信打开www.baidu.com 效果类似于在聊天页面鼠标点击链接打开网站 以下是山海LUA插件类似功能,请参考: --指定APP打开网址 [存在部分应用版本不兼容情况] function QMPlugin.RunUrl(url,ID) sh_init() local tmpact if ID == 0 then --360浏览器 tmpact = "com.qihoo.browser/.BrowserActivity" elseif ID == 1 then --QQ浏览器 tmpact = "com.tencent.mtt.x86/.MainActivity" elseif ID == 2 then --海豚浏览器 tmpact = "com.dolphin.browser.xf/mobi.mgeek.TunnyBrowser.MainActivity" elseif ID == 3 then --欧朋浏览器 tmpact = "com.oupeng.browser/com.opera.android.OperaMainActivity" elseif ID == 4 then --傲游浏览器 tmpact = "com.mx.browser/.MxBrowserActivity" elseif ID == 5 then --UC浏览器 tmpact = "com.UCMobile/com.uc.browser.InnerUCMobile" end os.execute(string.format("am start -n %s -d %s",tmpact,url)) end --用微信浏览器打开网页 [作者:小玮] function QMPlugin.WeiXinUrl(packagename,url) sh_init() os.execute(string.format("am start -n %s/.plugin.webview.ui.tools.WebViewUI -d '%s'",packagename,url)) end --用默认浏览器打开网页 [作者:小玮] function QMPlugin.OpenWeb(url) sh_init() if url:find("http://") == nil then url = "http://"..url end os.execute(string.format("am start -a android.intent.action.VIEW -d "..url)) end

ANDROID STUDIO网络问题

报错为: 01/09 11:01:50: Launching app $ adb push C:\Users\Administrator\AndroidStudioProjects\MyApplication13\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.administrator.myapplication $ adb shell pm install -r "/data/local/tmp/com.example.administrator.myapplication" Success $ adb shell am start -n "com.example.administrator.myapplication/com.example.administrator.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Connected to process 2346 on device emulator-5554 W/System: ClassLoader referenced unknown path: /data/app/com.example.administrator.myapplication-1/lib/x86 I/InstantRun: Instant Run Runtime started. Android package is com.example.administrator.myapplication, real application class is null. W/System: ClassLoader referenced unknown path: /data/app/com.example.administrator.myapplication-1/lib/x86 W/art: Verification of void android.support.v7.app.AppCompatActivity.onSupportActionModeFinished(android.support.v7.view.ActionMode) took 1.372s W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable W/gralloc_ranchu: Gralloc pipe failed [ 01-09 03:02:02.837 2346: 2346 D/ ] HostConnection::get() New Host Connection established 0x9daf8380, tid 2346 I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 D/NetworkSecurityConfig: No Network Security Config specified, using platform default Application terminated. 在权限中,我已经添加了网络权限。 但是不知道为什么就是不行。 源代码如下: package com.example.administrator.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import static android.icu.lang.UCharacter.GraphemeClusterBreak.V; public class MainActivity extends AppCompatActivity implements View.OnClickListener{ TextView responseText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button sendRquest=(Button)findViewById(R.id.send_request); responseText=(TextView)findViewById(R.id.requestion_text); sendRquest.setOnClickListener(this); } public void onClick(View v) { if(v.getId()==R.id.send_request) { sendResquestWithHttpURLConnection(); } } private void sendResquestWithHttpURLConnection() { new Thread(new Runnable() { @Override public void run() { HttpURLConnection connection=null; BufferedReader reader=null; try{ URL url=new URL("http://www.baidu.com"); connection=(HttpURLConnection)url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(8000); connection.setReadTimeout(8000); InputStream in=connection.getInputStream(); reader=new BufferedReader(new InputStreamReader(in)); StringBuilder response=new StringBuilder(); String line; while((line=reader.readLine())!=null) { response.append(in); } showResponse(response.toString()); } catch(Exception e) { e.printStackTrace(); } finally { if(reader!=null){ try{ reader.close(); }catch (IOException e) { e.printStackTrace(); } } if(connection!=null) { connection.disconnect(); } } } }).start(); } private void showResponse(final String response){ runOnUiThread(new Runnable(){ public void run(){ responseText.setText(response); } }); } }

java.lang.ClassNotFoundException: com.android.id.impl.IdProviderImpl

巨量引擎SDK接入报错java.lang.ClassNotFoundException: com.android.id.impl.IdProviderImpl 求救,非常感谢! ``` 05/15 16:49:59: Launching 'app' on Pixel 2 API 28. $ adb shell am start -n "com.cn.leaf.demo/com.cn.leaf.demo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 6411 on device 'Pixel_2_API_28 [emulator-5554]'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/MultiDex: VM with version 2.1.0 has multidex support Installing application VM has multidex support, MultiDex support library is disabled. W/om.cn.leaf.dem: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking) Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking) Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking) Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking) Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking) W/om.cn.leaf.dem: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection) W/om.cn.leaf.dem: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection) W/om.cn.leaf.dem: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking) D/TrackerDr: f#init: D/TrackerDr: i#init: E/i#IdentifierManager: reflect exception! java.lang.ClassNotFoundException: com.android.id.impl.IdProviderImpl at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at com.bytedance.a.i$a.<clinit>(SourceFile:195) at com.bytedance.a.i$a.a(SourceFile:185) at com.bytedance.a.i.a(SourceFile:106) at com.bytedance.a.i.<init>(SourceFile:49) at com.bytedance.a.i.b(SourceFile:41) at com.bytedance.a.i.a(SourceFile:34) at com.bytedance.a.g.a(SourceFile:46) at com.bytedance.a.b.a(SourceFile:33) at com.bytedance.applog.b.i.<init>(SourceFile:67) at com.bytedance.applog.AppLog.init(SourceFile:106) at com.cn.leaf.demo.MainActivity.initConfig(MainActivity.java:133) at com.cn.leaf.demo.MainActivity.PerMissions(MainActivity.java:186) at com.cn.leaf.demo.MainActivity.judgeBrand(MainActivity.java:265) at com.cn.leaf.demo.MainActivity.onCreate(MainActivity.java:56) at android.app.Activity.performCreate(Activity.java:7136) at android.app.Activity.performCreate(Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.id.impl.IdProviderImpl" on path: DexPathList[[zip file "/data/app/com.cn.leaf.demo-XfKMKxO94jFGo_lzV_gX6A==/base.apk"],nativeLibraryDirectories=[/data/app/com.cn.leaf.demo-XfKMKxO94jFGo_lzV_gX6A==/lib/x86, /data/app/com.cn.leaf.demo-XfKMKxO94jFGo_lzV_gX6A==/base.apk!/lib/x86, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:453)  at java.lang.Class.forName(Class.java:378)  at com.bytedance.a.i$a.<clinit>(SourceFile:195)  at com.bytedance.a.i$a.a(SourceFile:185)  at com.bytedance.a.i.a(SourceFile:106)  at com.bytedance.a.i.<init>(SourceFile:49)  at com.bytedance.a.i.b(SourceFile:41)  at com.bytedance.a.i.a(SourceFile:34)  at com.bytedance.a.g.a(SourceFile:46)  at com.bytedance.a.b.a(SourceFile:33)  at com.bytedance.applog.b.i.<init>(SourceFile:67)  at com.bytedance.applog.AppLog.init(SourceFile:106)  at com.cn.leaf.demo.MainActivity.initConfig(MainActivity.java:133)  at com.cn.leaf.demo.MainActivity.PerMissions(MainActivity.java:186)  at com.cn.leaf.demo.MainActivity.judgeBrand(MainActivity.java:265)  at com.cn.leaf.demo.MainActivity.onCreate(MainActivity.java:56)  at android.app.Activity.performCreate(Activity.java:7136)  at android.app.Activity.performCreate(Activity.java:7127)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:6669)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)  ```

android 第一次做自定义控件 java.lang.RuntimeException异常

package com.example.q9722.biancheng; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.util.AttributeSet; import android.widget.TextView; /** * Created by q9722 on 2018/1/1. */ public class test_text extends TextView { private String mText = "111",mNumber = "222"; private Paint mPaint; private Rect mNumberRect; public test_text(Context context, String mText, String mNumber) { this(context, null, mText, mNumber); } public test_text(Context context, AttributeSet attrs, String mText, String mNumber) { this(context, attrs, 0, mText, mNumber); } public test_text(Context context, AttributeSet attrs, int defStyleAttr, String mText, String mNumber) { super(context, attrs, defStyleAttr); this.mText = mText; this.mNumber = mNumber; init(); } private void init() { mPaint = new Paint(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); mPaint.setColor(Color.BLACK); mPaint.setStyle(Paint.Style.STROKE); canvas.drawRect(0, 0, getWidth(), getHeight(), mPaint); canvas.drawCircle(getWidth()/6*4, getHeight()/4*3,getHeight()/4,mPaint); mPaint.setTextSize(18); mPaint.getTextBounds(mNumber, 0, mNumber.length(), mNumberRect); canvas.drawText(mText, 2 ,getHeight()/5,mPaint); canvas.drawText(mNumber, (getWidth()/6*4)-(mNumberRect.width()/2), (getHeight()/4*3)-(mNumberRect.hashCode()/2), mPaint); } } 01/01 18:58:49: Launching app $ adb push C:\Users\q9722\AndroidStudioProjects\BianCheng\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.q9722.biancheng $ adb shell pm install -r "/data/local/tmp/com.example.q9722.biancheng" Success $ adb shell am start -n "com.example.q9722.biancheng/com.example.q9722.biancheng.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 30129 on device xiaomi-mi_5-43ac216f W/System: ClassLoader referenced unknown path: /data/app/com.example.q9722.biancheng-1/lib/arm64 I/InstantRun: Instant Run Runtime started. Android package is com.example.q9722.biancheng, real application class is null. W/System: ClassLoader referenced unknown path: /data/app/com.example.q9722.biancheng-1/lib/arm64 W/MIUI-BLOCK-MONITOR: The msg { when=-72ms what=110 obj=AppBindData{appInfo=ApplicationInfo{7c1e14a com.example.q9722.biancheng}} target=android.app.ActivityThread$H planTime=1514804333143 dispatchTime=1514804333215 finishTime=0 } took 3826ms and took 3754ms after dispatch. W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable W/System: ClassLoader referenced unknown path: /system/app/MiuiContentCatcher/lib/arm64 D/AccessibilityManager: current package=com.example.q9722.biancheng, accessibility manager mIsFinalEnabled=false, mOptimizeEnabled=true, mIsUiAutomationEnabled=false, mIsInterestedPackage=false V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@717395 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@bc3ccaa V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@664d14e D/ActivityThreadInjector: clearCachedDrawables. I/Adreno: QUALCOMM build : 620c068, I09d312ff84 Build Date : 08/07/17 OpenGL ES Shader Compiler Version: XE031.09.00.04 Local Branch : Remote Branch : Remote Branch : Reconstruct Branch : I/Choreographer: Skipped 33 frames! The application may be doing too much work on its main thread. I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@c8e9e47 I/Timeline: Timeline: Activity_launch_request time:84494803 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@cd359d1 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@4011c36 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.q9722.biancheng, PID: 30129 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.q9722.biancheng/com.example.q9722.biancheng.MainActivity}: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6321) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) Caused by: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] at java.lang.Class.getConstructor0(Class.java:2204) at java.lang.Class.getConstructor(Class.java:1683) at android.view.LayoutInflater.createView(LayoutInflater.java:622) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:812) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752) at android.view.LayoutInflater.rInflate(LayoutInflater.java:883) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846) at android.view.LayoutInflater.inflate(LayoutInflater.java:522) at android.view.LayoutInflater.inflate(LayoutInflater.java:430) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.q9722.biancheng.MainActivity.onCreate(MainActivity.java:17) at android.app.Activity.performCreate(Activity.java:6847) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6321) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) Application terminated.

Android 一用charAt()就卡退了

不知道怎么回事。。 ``` package com.example.lenovo.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button = (Button)findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this,"123456".charAt(2),Toast.LENGTH_SHORT).show(); } }); } } ``` ![图片说明](https://img-ask.csdn.net/upload/201911/04/1572859721_587300.png) 报错: ``` 11/04 17:21:36: Launching app $ adb push D:\study\Android\MyApplication2\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.lenovo.myapplication $ adb shell pm install -r "/data/local/tmp/com.example.lenovo.myapplication" Success $ adb shell am start -n "com.example.lenovo.myapplication/com.example.lenovo.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 4133 on device Nexus_5_API_24 [emulator-5554] W/System: ClassLoader referenced unknown path: /data/app/com.example.lenovo.myapplication-1/lib/x86 I/InstantRun: Instant Run Runtime started. Android package is com.example.lenovo.myapplication, real application class is null. W/System: ClassLoader referenced unknown path: /data/app/com.example.lenovo.myapplication-1/lib/x86 W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable W/gralloc_ranchu: Gralloc pipe failed [ 11-04 09:21:43.377 4133: 4133 D/ ] HostConnection::get() New Host Connection established 0xa63882c0, tid 4133 [ 11-04 09:21:43.425 4133: 4224 D/ ] HostConnection::get() New Host Connection established 0xa6388740, tid 4224 I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 W/ResourceType: No package identifier when getting value for resource number 0x00000033 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.lenovo.myapplication, PID: 4133 android.content.res.Resources$NotFoundException: String resource ID #0x33 at android.content.res.Resources.getText(Resources.java:331) at android.widget.Toast.makeText(Toast.java:287) at com.example.lenovo.myapplication.MainActivity$1.onClick(MainActivity.java:19) at android.view.View.performClick(View.java:5610) at android.view.View$PerformClick.run(View.java:22260) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Application terminated. ```

为什么我的FragmentStatePagerAdapter返回空值

package com.example.administrator.criminalintent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import java.util.List; import java.util.UUID; /** * Created by Administrator on 2017/7/23 0023. */ public class CrimePagerActivity extends FragmentActivity { private ViewPager mViewPager; private List<Crime> mCrimes; private static final String EXTRA_CRIME_ID="com.example.android.criminalintent.crime_id"; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mViewPager= (ViewPager) findViewById(R.id.activity_crime_pager_view_pager); mCrimes=CrimeLab.get(this).getCrimes(); FragmentManager fragmentManager=getSupportFragmentManager(); UUID crimeId= (UUID) getIntent().getSerializableExtra(EXTRA_CRIME_ID); FragmentStatePagerAdapter adapter=new FragmentStatePagerAdapter(fragmentManager) { @Override public Fragment getItem(int position) { Crime crime=mCrimes.get(position); return CrimeFragment.newInstance(crime.getmId()); } @Override public int getCount() { return mCrimes.size(); } }; mViewPager.setAdapter(adapter);//报错说我的adapter是空的 for(int i=0;i<mCrimes.size();i++){ if(mCrimes.get(i).getmId().equals(crimeId)){ mViewPager.setCurrentItem(i); break; } } } public static Intent newIntent(Context context, UUID crimeId){ Intent intent=new Intent(context,CrimePagerActivity.class); intent.putExtra(EXTRA_CRIME_ID,crimeId); return intent; } } //这下面是exception 07/24 00:51:55: Launching app Cold swapped changes. $ adb shell am start -n "com.example.administrator.criminalintent/com.example.administrator.criminalintent.CrimeListActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Waiting for process to come online Connected to process 7959 on device New_Device_API_25 [emulator-5554] I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/OpenGLRenderer: Swap behavior 0 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.administrator.criminalintent, PID: 7959 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.administrator.criminalintent/com.example.administrator.criminalintent.CrimePagerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)' on a null object reference at com.example.administrator.criminalintent.CrimePagerActivity.onCreate(CrimePagerActivity.java:46) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  Application terminated.

Android studio中使用.txm地图文件时报错黑屏

# 想弄一个类似于植物大战僵尸的地图,用tiled做的地图,但是运行的时候报错 map.tmx ``` <?xml version="1.0" encoding="UTF-8"?> <map version="1.2" tiledversion="2020.05.07" orientation="orthogonal" renderorder="right-down" width="14" height="6" tilewidth="46" tileheight="53" infinite="0" nextlayerid="3" nextobjectid="11"> <tileset firstgid="1" source="bg1.tsx"/> <layer id="1" name="block" width="14" height="6"> <data encoding="base64" compression="zstd"> KLUv/WBQAD0BADhGAAAA70ZGDqCAuwZAgwm7GFde5/5Imf2EJ4J01NnkdSLK+HwyGQ== </data> </layer> <objectgroup id="2" name="road"> <object id="1" x="22.8925" y="78.0425"/> <object id="2" x="114.462" y="78.0425"/> <object id="3" x="113.422" y="238.29"/> <object id="4" x="207.073" y="239.33"/> <object id="5" x="207.073" y="78.0425"/> <object id="6" x="345.468" y="78.0425"/> <object id="7" x="345.468" y="239.33"/> <object id="8" x="483.864" y="238.29"/> <object id="9" x="484.904" y="75.9614"/> <object id="10" x="620.178" y="75.9614"/> </objectgroup> </map> ``` bg1.tsx ``` <?xml version="1.0" encoding="UTF-8"?> <tileset version="1.2" tiledversion="2020.05.07" name="bg1" tilewidth="46" tileheight="53" tilecount="330" columns="30"> <image source="bg1.jpg" width="1400" height="600"/> </tileset> ``` 控制台报错信息 ``` 05/20 10:41:12: Launching 'Cocos2DDemo' on MyAVD. $ adb shell am start -n "com.example.cocos2ddemo/com.example.cocos2ddemo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Waiting for process to come online... Connected to process 3926 on device 'emulator-5554'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable D/CCDirector: cocos2d: cocos2d v0.99.4 D/CCDirector: cocos2d: Using Director Type:class org.cocos2d.nodes.CCDirector I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper> Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper> I/art: Background partial concurrent mark sweep GC freed 1184(115KB) AllocSpace objects, 0(0B) LOS objects, 52% free, 942KB/1966KB, paused 21.657ms total 37.828ms D/CCTMXMapInfo: cocos2d: TMXFormat: Unsupported TMX version: 1.2 E/CCTMXMapInfo: [Ljava.lang.StackTraceElement;@e2a23f9 I/GLThread: noticed surfaceView surface lost tid=212 I/Main thread: onWindowResize waiting for render complete. I/GLThread: noticed surfaceView surface acquired tid=212 D/gralloc_ranchu: Emulator without host-side GPU emulation detected. Loading gralloc.default.so from /vendor/lib/hw/gralloc.default.so... gralloc.default.so not found in /vendor. Trying /system/lib/hw/gralloc.default.so... I/Main thread: Focus gained ``` logcat错误信息 ``` 05-20 02:35:13.125 3662-3662/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:35:13.125 3662-3662/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:35:13.183 3662-3673/? E/art: Thread attaching while runtime is shutting down: Binder_2 05-20 02:35:13.582 3674-3674/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:35:13.582 3674-3674/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:35:14.162 3687-3687/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:35:14.162 3687-3687/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:35:14.856 1570-1623/system_process E/InputDispatcher: channel '13f325a8 com.example.cocos2ddemo/com.example.cocos2ddemo.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 05-20 02:35:14.941 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:35:14.941 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:35:14.941 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:35:14.986 3706-3706/? E/cutils-trace: Error opening trace file: Permission denied (13) 05-20 02:35:18.766 3713-3713/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:35:18.766 3713-3713/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:35:18.821 3724-3724/? E/libprocessgroup: failed to make and chown /acct/uid_10063: Read-only file system 05-20 02:35:18.858 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:35:18.858 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:35:18.858 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:35:19.366 3724-3724/? E/CCTMXMapInfo: [Ljava.lang.StackTraceElement;@e2a23f9 05-20 02:36:02.002 3746-3746/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:36:02.003 3746-3746/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:36:02.088 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:36:02.088 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:36:02.088 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:36:02.215 3748-3748/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:36:02.216 3748-3748/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:36:02.251 3748-3773/? E/art: Thread attaching while runtime is shutting down: Binder_1 05-20 02:36:03.083 3774-3774/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:36:03.085 3774-3774/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:36:03.850 3787-3787/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:36:03.851 3787-3787/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:36:04.293 3800-3800/? E/cutils-trace: Error opening trace file: Permission denied (13) 05-20 02:36:08.052 3809-3809/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:36:08.053 3809-3809/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:36:08.095 3820-3820/? E/libprocessgroup: failed to make and chown /acct/uid_10063: Read-only file system 05-20 02:36:08.122 3820-3828/? E/art: Failed writing handshake bytes (-1 of 14): Broken pipe 05-20 02:36:08.130 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:36:08.130 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:36:08.130 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:36:08.494 3820-3820/? E/CCTMXMapInfo: [Ljava.lang.StackTraceElement;@3f0e6ac0 05-20 02:41:13.233 3867-3867/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:41:13.233 3867-3867/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:41:13.335 3867-3877/? E/art: Thread attaching while runtime is shutting down: Binder_1 05-20 02:41:13.809 3878-3878/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:41:13.809 3878-3878/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:41:14.505 3891-3891/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:41:14.506 3891-3891/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:41:15.100 1570-1623/system_process E/InputDispatcher: channel '3974ec1f com.example.cocos2ddemo/com.example.cocos2ddemo.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 05-20 02:41:15.375 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:41:15.376 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:41:15.376 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:41:15.426 3904-3904/? E/cutils-trace: Error opening trace file: Permission denied (13) 05-20 02:41:19.953 3915-3915/? E/memtrack: Couldn't load memtrack module (No such file or directory) 05-20 02:41:19.953 3915-3915/? E/android.os.Debug: failed to load memtrack module: -2 05-20 02:41:20.053 3926-3926/? E/libprocessgroup: failed to make and chown /acct/uid_10063: Read-only file system 05-20 02:41:20.110 1145-1145/? E/libEGL: called unimplemented OpenGL ES API 05-20 02:41:20.110 1145-1145/? E/SurfaceFlinger: glCheckFramebufferStatusOES error -167515460 05-20 02:41:20.110 1145-1145/? E/SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 05-20 02:41:20.721 3926-3926/com.example.cocos2ddemo E/CCTMXMapInfo: [Ljava.lang.StackTraceElement;@e2a23f9 ```

安卓开发JDBC连接数据库No static method metafactory错误怎么解决?

直接上代码 JdbcUtil类 ``` package com.example.myapplication; import java.io.File; import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.util.Properties; public class JdbcUtil { private static JdbcUtil instance; public static JdbcUtil getInstance(){ if (instance ==null){ instance = new JdbcUtil(); } return instance; } public Connection getConnection(String dbName,String name,String password) { try { new com.mysql.cj.jdbc.Driver(); String url = "jdbc:mysql://localhost:3306/"+dbName; return DriverManager.getConnection(url,name,password); } catch (Exception e) { return null; } } public Connection getConnection(String file){ File f = new File(file); if(!f.exists()){ return null; }else { Properties pro = new Properties(); try { Class.forName("com.mysql.jdbc.Driver"); pro.load(new FileInputStream(f)); String url = pro.getProperty("url"); String name = pro.getProperty("name"); String password = pro.getProperty("password"); return DriverManager.getConnection(url,name,password); }catch (Exception e){ return null; } } } } ``` UserDao类 ``` package com.example.myapplication; import android.util.Log; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import static android.content.ContentValues.TAG; public class UserDao { JdbcUtil jdbcUtil = JdbcUtil.getInstance(); //第一个参数为数据库名称,第二个参数为数据库账号 第三个参数为数据库密码 Connection conn = jdbcUtil.getConnection("test","root","LHMbdbqandr2015"); //注册 public boolean register(String name,String password){ if (conn==null){ Log.i(TAG,"register:conn is null"); return false; }else { //进行数据库操作 String sql = "insert into user(name,password) values(?,?)"; try { PreparedStatement pre = conn.prepareStatement(sql); pre.setString(1,name); pre.setString(2,password); return pre.execute(); } catch (SQLException e) { return false; }finally { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } } //登录 public boolean login(String name,String password){ if (conn==null){ Log.i(TAG,"register:conn is null"); return false; }else { String sql = "select * from user where name=? and password=?"; try { PreparedStatement pres = conn.prepareStatement(sql); pres.setString(1,name); pres.setString(2,password); ResultSet res = pres.executeQuery(); boolean t = res.next(); return t; } catch (SQLException e) { return false; } } } } ``` MainActivity文件 ``` package com.example.myapplication; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Looper; import android.os.Trace; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private static final String TAG="MainActivity"; private EditText name; private EditText password; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); name = findViewById(R.id.name); password = findViewById(R.id.password); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling // Activity#requestPermissions requestPermissions(new String[]{Manifest.permission.INTERNET},1); // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) // to handle the case where the user grants the permission. See the documentation // for Activity#requestPermissions for more details. return; } } } //用户根据点击事件来找到相应的功能 public void fun(View v){ switch (v.getId()){ case R.id.register: new Thread(new Runnable() { @Override public void run() { String n = name.getText().toString().trim(); String psw = password.getText().toString().trim(); UserDao ud = new UserDao(); boolean result =ud.register(n,psw); if (!result){ Looper.prepare(); Toast toast = Toast.makeText(MainActivity.this,"注册成功!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); } Log.i(TAG,"fun"+result); //以上为jdbc注册 } }).start(); break; case R.id.login: new Thread(new Runnable() { @Override public void run() { String n = name.getText().toString().trim(); String psw = password.getText().toString().trim(); if (n.equals("")||psw.equals("")){ Looper.prepare(); Toast toast = Toast.makeText(MainActivity.this,"输入不能为空!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); } UserDao ud = new UserDao(); Boolean result = ud.login(n,psw); if (!result){ Looper.prepare(); Toast toast=Toast.makeText(MainActivity.this,"用户名不存在或密码错误!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); }else{ Looper.prepare(); Toast toast=Toast.makeText(MainActivity.this,"登录成功",Toast.LENGTH_SHORT); toast.show(); //一下代码为跳转界面 // Intent intent=new Intent(MainActivity.this,info.class); //intent.putExtra("name",n); // startActivity(intent); Looper.loop(); } //以上为jdbc登录 } }).start(); } } } ``` 现在遇到的问题如下 ``` 11/14 01:40:49: Launching 'app' on Nexus 5X API 29 x86. $ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Waiting for process to come online... Connected to process 23852 on device 'emulator-5554'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/e.myapplicatio: Not late-enabling -Xcheck:jni (already on) E/e.myapplicatio: Unknown bits set in runtime_flags: 0x8000 W/e.myapplicatio: Unexpected CPU variant for X86 using defaults: x86 D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) W/RenderThread: type=1400 audit(0.0:129): avc: denied { write } for name="property_service" dev="tmpfs" ino=8368 scontext=u:r:untrusted_app:s0:c130,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.example.myapplication D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) D/: HostConnection::get() New Host Connection established 0xd7d24f50, tid 23910 D/: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation: eglCreateContext: 0xe3340b60: maj 3 min 1 rcv 4 D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da glUtilsParamSize: unknow param 0x000082da W/Gralloc3: mapper 3.x is not supported D/: createUnique: call D/: HostConnection::get() New Host Connection established 0xd7d26ad0, tid 23910 HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 D/eglCodecCommon: allocate: Ask for block of size 0x1000 D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ffff6000 size 0x2000 D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0 I/AssistStructure: Flattened final assist data: 1788 bytes, containing 1 windows, 10 views W/e.myapplicatio: Accessing hidden method Ljava/lang/invoke/LambdaMetafactory;->metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (blacklist, linking, denied) E/AndroidRuntime: FATAL EXCEPTION: Thread-2 Process: com.example.myapplication, PID: 23852 java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar) at com.mysql.cj.conf.ConnectionUrl.buildConnectionStringCacheKey(ConnectionUrl.java:246) at com.mysql.cj.conf.ConnectionUrl.getConnectionUrlInstance(ConnectionUrl.java:185) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:204) at java.sql.DriverManager.getConnection(DriverManager.java:580) at java.sql.DriverManager.getConnection(DriverManager.java:218) at com.example.myapplication.JdbcUtil.getConnection(JdbcUtil.java:22) at com.example.myapplication.UserDao.<init>(UserDao.java:15) at com.example.myapplication.MainActivity$1.run(MainActivity.java:53) at java.lang.Thread.run(Thread.java:919) D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) D/AutofillManager: onActivityFinishing(): calling cancelLocked() Process 23852 terminated. ``` 在网上百度了很多方法都没有解决,起初以为是驱动的问题,但是换了一个仍然不好用,求求大神赐教

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

程序员必知的 89 个操作系统核心概念

操作系统(Operating System,OS):是管理计算机硬件与软件资源的系统软件,同时也是计算机系统的内核与基石。操作系统需要处理管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本事务。操作系统也提供一个让用户与系统交互的操作界面。 shell:它是一个程序,可从键盘获取命令并将其提供给操作系统以执行。 在过去,它是类似 Unix 的系统上...

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

阿里面试,问了B+树,这个回答让我通过了

上周我通过阿里一面,岗位是客户端开发工程师。面试过程中面试官问了B+树,回答时面试官一直点头(应该回答得还不错,过了),今天详细讲一讲B+树。

看完这篇 Session、Cookie、Token,和面试官扯皮就没问题了

Cookie 和 Session HTTP 协议是一种无状态协议,即每次服务端接收到客户端的请求时,都是一个全新的请求,服务器并不知道客户端的历史请求记录;Session 和 Cookie 的主要目的就是为了弥补 HTTP 的无状态特性。 Session 是什么 客户端请求服务端,服务端会为这次请求开辟一块内存空间,这个对象便是 Session 对象,存储结构为 ConcurrentHashMa...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

毕业5年,我熬夜整理出了这50个优质的电子书网站,吐血推荐!

大家好,我是武哥,最近经常有小伙伴问我要电子书,都什么年代了,还找不到电子书吗?如果要说原因,那就是你还没遇到武哥我(手动滑稽~)!我今天把这么多年我经常看的电子书网站整理一下给大家,基本上能解决大家的需求。不管是在校生还是已经工作了,相信肯定对你有所帮助! 1.鸠摩搜书 首先给大家推荐的网站是:鸠摩搜书 地址:https://www.jiumodiary.com/ 这个网上非常棒,上面有很多优质...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

立即提问
相关内容推荐